mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-01-10 06:27:55 -05:00
Reintroduce "Disable Automatic Restart after Windows Update"
This commit is contained in:
@@ -80,6 +80,7 @@ DisableRemoteAssistance # EnableRemoteAssistance
|
||||
# DisableUpdateDriver # EnableUpdateDriver
|
||||
EnableUpdateMSProducts # DisableUpdateMSProducts
|
||||
# DisableUpdateAutoDownload # EnableUpdateAutoDownload
|
||||
DisableUpdateRestart # EnableUpdateRestart
|
||||
DisableMaintenanceWakeUp # EnableMaintenanceWakeUp
|
||||
DisableSharedExperiences # EnableSharedExperiences
|
||||
# EnableClipboardHistory # DisableClipboardHistory
|
||||
|
||||
17
Win10.psm1
17
Win10.psm1
@@ -1206,6 +1206,23 @@ Function EnableUpdateAutoDownload {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable automatic restart after Windows Update installation
|
||||
# The tweak is slightly experimental, as it registers a dummy debugger for MusNotification.exe
|
||||
# which blocks the restart prompt executable from running, thus never schedulling the restart
|
||||
Function DisableUpdateRestart {
|
||||
Write-Output "Disabling Windows Update automatic restart..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe" -Name "Debugger" -Type String -Value "cmd.exe"
|
||||
}
|
||||
|
||||
# Enable automatic restart after Windows Update installation
|
||||
Function EnableUpdateRestart {
|
||||
Write-Output "Enabling Windows Update automatic restart..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe" -Name "Debugger" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable nightly wake-up for Automatic Maintenance and Windows Updates
|
||||
Function DisableMaintenanceWakeUp {
|
||||
Write-Output "Disabling nightly wake-up for Automatic Maintenance..."
|
||||
|
||||
Reference in New Issue
Block a user