From 1cd918cbe17172d5322ce4456147f5c52dcbca3d Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:28:06 -0700 Subject: [PATCH] Remove OneDrive startup entry (#4253) * Remove Onedrive startup entry * Merge branch 'ChrisTitusTech:main' into patch-1 * Merge branch 'ChrisTitusTech:main' into patch-1 * Merge branch 'main' into patch-1 --- functions/private/Invoke-WinUtilISOScript.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/private/Invoke-WinUtilISOScript.ps1 b/functions/private/Invoke-WinUtilISOScript.ps1 index c6749d6f..b5bfa4cb 100644 --- a/functions/private/Invoke-WinUtilISOScript.ps1 +++ b/functions/private/Invoke-WinUtilISOScript.ps1 @@ -199,6 +199,9 @@ function Invoke-WinUtilISOScript { & icacls "$ScratchDir\Windows\System32\OneDriveSetup.exe" /grant "$($adminGroup.Value):(F)" /T /C | Out-Null Remove-Item -Path "$ScratchDir\Windows\System32\OneDriveSetup.exe" -Force -ErrorAction SilentlyContinue + # Remove OneDrive from startup registry + Remove-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\Run\OneDrive' + # ── 4. Registry tweaks ──────────────────────────────────────────────────── & $Log "Loading offline registry hives..." reg load HKLM\zCOMPONENTS "$ScratchDir\Windows\System32\config\COMPONENTS"