mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 22:27:28 +00:00
Hide Windows Updates from setting menu when disabling updates (#4445)
* Update Invoke-WPFUpdatesdisable.ps1 * Update Invoke-WPFUpdatesdefault.ps1 * Update Invoke-WPFUpdatesdefault.ps1 * Merge branch 'ChrisTitusTech:main' into patch-1 * Merge branch 'ChrisTitusTech:main' into patch-1 * Update Invoke-WPFUpdatesdisable.ps1 * Update Invoke-WPFUpdatesdisable.ps1
This commit is contained in:
@@ -16,6 +16,9 @@ function Invoke-WPFUpdatesdefault {
|
|||||||
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Recurse -Force
|
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Recurse -Force
|
||||||
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Recurse -Force
|
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Recurse -Force
|
||||||
|
|
||||||
|
Write-Host "Showing Windows Updates in settings"
|
||||||
|
Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name SettingsPageVisibility
|
||||||
|
|
||||||
Write-Host "Reenabling Windows Update Services..." -ForegroundColor Green
|
Write-Host "Reenabling Windows Update Services..." -ForegroundColor Green
|
||||||
|
|
||||||
Write-Host "Restored BITS to Manual"
|
Write-Host "Restored BITS to Manual"
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ function Invoke-WPFUpdatesdisable {
|
|||||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force
|
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0
|
||||||
|
|
||||||
|
Write-Host "Hiding Windows Updates from settings"
|
||||||
|
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer -Name SettingsPageVisibility -Value hide:windowsupdate
|
||||||
|
|
||||||
Write-Host "Disabled BITS Service"
|
Write-Host "Disabled BITS Service"
|
||||||
Set-Service -Name BITS -StartupType Disabled
|
Set-Service -Name BITS -StartupType Disabled
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user