mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-16 02:08:31 +00:00
Fix: onedrivesetup not being removed (#4317)
* Removed onedrive removal from Invoke-WinUtilISOScript.ps1 * Update autounattend.xml * Update Invoke-WinUtilISOScript.ps1
This commit is contained in:
@@ -199,9 +199,6 @@ 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"
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ $scripts = @(
|
|||||||
) -Recurse -Force -ErrorAction 'SilentlyContinue';
|
) -Recurse -Force -ErrorAction 'SilentlyContinue';
|
||||||
};
|
};
|
||||||
{
|
{
|
||||||
|
reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f;
|
||||||
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /f;
|
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /f;
|
||||||
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /f;
|
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /f;
|
||||||
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v UseWUServer /f;
|
reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v UseWUServer /f;
|
||||||
|
|||||||
Reference in New Issue
Block a user