Skip to content

Commit

Permalink
added disable 3rd party apps selective reg. tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
gdeliana committed Dec 23, 2021
1 parent ab7d7ec commit 2babe92
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 15 deletions.
46 changes: 31 additions & 15 deletions Content/Additional/SelectiveRegistry/SelectiveRegistry.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RegHives -Load
if($SelectiveRegistry.DisableWindowsUpgrade -eq $true) {
If($SelectiveRegistry.DisableWindowsUpgrade) {

$TargetReleaseVersionInfo = $null

Expand Down Expand Up @@ -34,32 +34,48 @@ if($SelectiveRegistry.DisableWindowsUpgrade -eq $true) {
}
Start-Sleep 1
}
if($SelectiveRegistry.DisableWindowsUpdateMicrosoft -eq $true) {
If($SelectiveRegistry.DisableWindowsUpdateMicrosoft) {
Log $OptimizeData.SelectiveRegistryWindowsUpdateMS
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DoNotConnectToWindowsUpdateInternetLocations" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DisableWindowsUpdateAccess" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DoNotConnectToWindowsUpdateInternetLocations" -Type DWord -Value "1"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DisableWindowsUpdateAccess" -Type DWord -Value "1"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "WUServer" -Type String -Value " "
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "WUStatusServer" -Type String -Value " "
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "UpdateServiceUrlAlternate" -Type String -Value " "
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Type DWord -Value "1"
Start-Sleep 1
}

if($SelectiveRegistry.DisableDriverUpdate -eq $true) {
If($SelectiveRegistry.DisableDriverUpdate) {
Log $OptimizeData.SelectiveRegistryDriverUpdate
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -Type DWord -Value 0
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -Type DWord -Value "1"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -Type DWord -Value "1"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -Type DWord -Value "1"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -Type DWord -Value "0"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value "1"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -Type DWord -Value "1"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value "1"
Start-Sleep 1
}

if($SelectiveRegistry.DormantOneDrive -eq $true) {
If($SelectiveRegistry.DormantOneDrive) {
Log $OptimizeData.SelectiveRegistryDormantOneDrive
RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "OneDriveSetup" -Type DWord -Value 0
RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "OneDriveSetup" -Type DWord -Value "0"
Start-Sleep 1
}

If ($SelectiveRegistry.Disable3rdPartyApps) {

Log $OptimizeData.SelectiveRegistryDisable3rdPartyApps

RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "OemPreInstalledAppsEnabled" -Type Dword -Value "0"
RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type Dword -Value "0"
RegKey -Path "HKLM:\WIM_HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type Dword -Value "0"
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type Dword -Value "1"

If ($Global:InstallInfo.Build -ge "22000") {
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Microsoft\PolicyManager\current\device\Start" -Name "ConfigureStartPins" -Type String -Value '{"pinnedList": [{}]}'
RegKey -Path "HKLM:\WIM_HKLM_SOFTWARE\Microsoft\PolicyManager\current\device\Start" -Name "ConfigureStartPins_ProviderSet" -Type Dword -Value "0"
}
Start-Sleep 1
}

Expand Down
1 change: 1 addition & 0 deletions Optimize-Offline.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Function Optimize-Offline
DisableWindowsUpdateMicrosoft = $false
DisableDriverUpdate = $false
DormantOneDrive = $false
Disable3rdPartyApps = $false
},
[Parameter(HelpMessage = 'Removal of windows services.')]
[ValidateSet('None', 'List', 'Advanced', 'Select')]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,4 @@ Useful for specifying any type of start behavior (including "4" "Disabled") to t
- DisableWindowsUpdateMicrosoft - Tweak disables completely windows update the microsoft way, breaks the ability of MS Store to download apps
- DisableDriverUpdate - Will disable windows update from updating hw drivers
- DormantOneDrive - Will disable the startup installation of Onedrive, but will not physically remove the setup of it
- Disable3rdPartyApps - Will remove the 3rd party apps installed with windows
1 change: 1 addition & 0 deletions en-US/Optimize-Offline.strings.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ SelectiveRegistryWindowsUpgrade = Disabling Windows Upgrade
SelectiveRegistryWindowsUpdateMS = Disabling Windows Update using Microsoft's Method
SelectiveRegistryDriverUpdate = Disabling automatic driver update
SelectiveRegistryDormantOneDrive = Enabling dormant OneDrive fix
SelectiveRegistryDisable3rdPartyApps = Disabling 3rd party apps
ServiceStartBoot = Boot
ServiceStartSystem = System
ServiceStartAutomatic = Automatic
Expand Down

0 comments on commit 2babe92

Please sign in to comment.