mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-05 22:28:31 +00:00
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
This commit is contained in:
@@ -199,6 +199,9 @@ function Invoke-WinUtilISOScript {
|
|||||||
& icacls "$ScratchDir\Windows\System32\OneDriveSetup.exe" /grant "$($adminGroup.Value):(F)" /T /C | Out-Null
|
& 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-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 ────────────────────────────────────────────────────
|
# ── 4. Registry tweaks ────────────────────────────────────────────────────
|
||||||
& $Log "Loading offline registry hives..."
|
& $Log "Loading offline registry hives..."
|
||||||
reg load HKLM\zCOMPONENTS "$ScratchDir\Windows\System32\config\COMPONENTS"
|
reg load HKLM\zCOMPONENTS "$ScratchDir\Windows\System32\config\COMPONENTS"
|
||||||
|
|||||||
Reference in New Issue
Block a user