mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
Added option to disable gameDVR, clearing start now backs up old file + more
Added new option to disable Game DVR. (#62) Clearing the start menu now creates a backup of the current start menu file. (#60) Fixed unnecessarily setting path variable in Get.ps1 in some situations (#59)
This commit is contained in:
7
Get.ps1
7
Get.ps1
@@ -10,6 +10,7 @@ param (
|
|||||||
[switch]$RemoveCommApps,
|
[switch]$RemoveCommApps,
|
||||||
[switch]$RemoveDevApps,
|
[switch]$RemoveDevApps,
|
||||||
[switch]$RemoveW11Outlook,
|
[switch]$RemoveW11Outlook,
|
||||||
|
[switch]$DisableDVR,
|
||||||
[switch]$DisableTelemetry,
|
[switch]$DisableTelemetry,
|
||||||
[switch]$DisableBingSearches, [switch]$DisableBing,
|
[switch]$DisableBingSearches, [switch]$DisableBing,
|
||||||
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
||||||
@@ -51,6 +52,9 @@ if ((Get-AppxPackage -Name "*Microsoft.DesktopAppInstaller*") -and ((winget -v)
|
|||||||
{
|
{
|
||||||
Write-Output "> Installing git..."
|
Write-Output "> Installing git..."
|
||||||
winget install git.git --accept-package-agreements --accept-source-agreements --disable-interactivity --no-upgrade
|
winget install git.git --accept-package-agreements --accept-source-agreements --disable-interactivity --no-upgrade
|
||||||
|
|
||||||
|
# Add default install location of git to path
|
||||||
|
$env:Path += ';C:\Program Files\Git\cmd'
|
||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
}
|
}
|
||||||
@@ -58,9 +62,6 @@ if ((Get-AppxPackage -Name "*Microsoft.DesktopAppInstaller*") -and ((winget -v)
|
|||||||
# Navigate to user temp directory
|
# Navigate to user temp directory
|
||||||
cd $env:TEMP
|
cd $env:TEMP
|
||||||
|
|
||||||
# Add default install location of git to path
|
|
||||||
$env:Path += ';C:\Program Files\Git\cmd'
|
|
||||||
|
|
||||||
# Download Win11Debloat from github
|
# Download Win11Debloat from github
|
||||||
Write-Output "> Downloading Win11Debloat..."
|
Write-Output "> Downloading Win11Debloat..."
|
||||||
git clone https://github.com/Raphire/Win11Debloat/
|
git clone https://github.com/Raphire/Win11Debloat/
|
||||||
|
|||||||
@@ -280,6 +280,7 @@ The quick and advanced method support parameters to tailor the behaviour of the
|
|||||||
| -RemoveW11Outlook | Remove the new Outlook for Windows app. |
|
| -RemoveW11Outlook | Remove the new Outlook for Windows app. |
|
||||||
| -RemoveDevApps | Remove developer-related apps such as Remote Desktop, DevHome and Power Automate. |
|
| -RemoveDevApps | Remove developer-related apps such as Remote Desktop, DevHome and Power Automate. |
|
||||||
| -RemoveGamingApps | Remove the Xbox App and Xbox Gamebar. |
|
| -RemoveGamingApps | Remove the Xbox App and Xbox Gamebar. |
|
||||||
|
| -DisableDVR | Disable Xbox game DVR. |
|
||||||
| -ClearStart | Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) |
|
| -ClearStart | Remove all pinned apps from the start menu. NOTE: This applies to all existing and new users. (Windows 11 update 22H2 or later only) |
|
||||||
| -DisableTelemetry | Disable telemetry, diagnostic data & targeted ads. |
|
| -DisableTelemetry | Disable telemetry, diagnostic data & targeted ads. |
|
||||||
| -DisableBing | Disable & remove bing search, bing AI & cortana in Windows search. |
|
| -DisableBing | Disable & remove bing search, bing AI & cortana in Windows search. |
|
||||||
|
|||||||
7
Regfiles/Disable_DVR.reg
Normal file
7
Regfiles/Disable_DVR.reg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\System\GameConfigStore]
|
||||||
|
"GameDVR_Enabled"=dword:00000000
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR]
|
||||||
|
"AllowGameDVR"=dword:00000000
|
||||||
7
Regfiles/Undo/Enable_DVR.reg
Normal file
7
Regfiles/Undo/Enable_DVR.reg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\System\GameConfigStore]
|
||||||
|
"GameDVR_Enabled"=dword:00000001
|
||||||
|
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR]
|
||||||
|
"AllowGameDVR"=dword:00000001
|
||||||
@@ -11,6 +11,7 @@ param (
|
|||||||
[switch]$RemoveCommApps,
|
[switch]$RemoveCommApps,
|
||||||
[switch]$RemoveDevApps,
|
[switch]$RemoveDevApps,
|
||||||
[switch]$RemoveW11Outlook,
|
[switch]$RemoveW11Outlook,
|
||||||
|
[switch]$DisableDVR,
|
||||||
[switch]$DisableTelemetry,
|
[switch]$DisableTelemetry,
|
||||||
[switch]$DisableBingSearches, [switch]$DisableBing,
|
[switch]$DisableBingSearches, [switch]$DisableBing,
|
||||||
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
[switch]$DisableLockscrTips, [switch]$DisableLockscreenTips,
|
||||||
@@ -406,9 +407,14 @@ function ClearStartMenu {
|
|||||||
# Copy Start menu to all users folders
|
# Copy Start menu to all users folders
|
||||||
ForEach ($startmenu in $usersStartMenu) {
|
ForEach ($startmenu in $usersStartMenu) {
|
||||||
$startmenuBinFile = $startmenu.Fullname + "\start2.bin"
|
$startmenuBinFile = $startmenu.Fullname + "\start2.bin"
|
||||||
|
$backupBinFile = $startmenuBinFile + ".bak"
|
||||||
|
|
||||||
# Check if bin file exists
|
# Check if bin file exists
|
||||||
if (Test-Path $startmenuBinFile) {
|
if (Test-Path $startmenuBinFile) {
|
||||||
|
# Backup current startmenu file
|
||||||
|
Move-Item -Path $startmenuBinFile -Destination $backupBinFile
|
||||||
|
|
||||||
|
# Copy template file
|
||||||
Copy-Item -Path $startmenuTemplate -Destination $startmenu -Force
|
Copy-Item -Path $startmenuTemplate -Destination $startmenu -Force
|
||||||
|
|
||||||
$cpyMsg = "Replaced start menu for user " + $startmenu.Fullname.Split("\")[2]
|
$cpyMsg = "Replaced start menu for user " + $startmenu.Fullname.Split("\")[2]
|
||||||
@@ -696,11 +702,18 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or ($SPP
|
|||||||
AddParameter 'RemoveW11Outlook' 'Remove the new Outlook for Windows app'
|
AddParameter 'RemoveW11Outlook' 'Remove the new Outlook for Windows app'
|
||||||
AddParameter 'RemoveDevApps' 'Remove developer-related apps'
|
AddParameter 'RemoveDevApps' 'Remove developer-related apps'
|
||||||
AddParameter 'RemoveGamingApps' 'Remove the Xbox App and Xbox Gamebar'
|
AddParameter 'RemoveGamingApps' 'Remove the Xbox App and Xbox Gamebar'
|
||||||
|
AddParameter 'DisableDVR' 'Disable Xbox game DVR'
|
||||||
}
|
}
|
||||||
'3' {
|
'3' {
|
||||||
Write-Output "You have selected $($global:SelectedApps.Count) apps for removal"
|
Write-Output "You have selected $($global:SelectedApps.Count) apps for removal"
|
||||||
|
|
||||||
AddParameter 'RemoveAppsCustom' "Remove $($global:SelectedApps.Count) apps:"
|
AddParameter 'RemoveAppsCustom' "Remove $($global:SelectedApps.Count) apps:"
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
if ($( Read-Host -Prompt "Disable Xbox game DVR? (y/n)" ) -eq 'y') {
|
||||||
|
AddParameter 'DisableDVR' 'Disable Xbox game DVR'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,15 +734,15 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or ($SPP
|
|||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
if ($( Read-Host -Prompt "Disable & remove bing search, bing AI & cortana in Windows search? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt "Disable tips, tricks, suggestions and ads in start, settings, notifications, explorer and lockscreen? (y/n)" ) -eq 'y') {
|
||||||
AddParameter 'DisableBing' 'Disable & remove bing search, bing AI & cortana in Windows search'
|
AddParameter 'DisableSuggestions' 'Disable tips, tricks, suggestions and ads in start, settings, notifications and Windows explorer'
|
||||||
|
AddParameter 'DisableLockscreenTips' 'Disable tips & tricks on the lockscreen'
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|
||||||
if ($( Read-Host -Prompt "Disable tips, tricks, suggestions and ads in start, settings, notifications, explorer and lockscreen? (y/n)" ) -eq 'y') {
|
if ($( Read-Host -Prompt "Disable & remove bing search, bing AI & cortana in Windows search? (y/n)" ) -eq 'y') {
|
||||||
AddParameter 'DisableSuggestions' 'Disable tips, tricks, suggestions and ads in start, settings, notifications and Windows explorer'
|
AddParameter 'DisableBing' 'Disable & remove bing search, bing AI & cortana in Windows search'
|
||||||
AddParameter 'DisableLockscreenTips' 'Disable tips & tricks on the lockscreen'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only show this option for Windows 11 users running build 22621 or later
|
# Only show this option for Windows 11 users running build 22621 or later
|
||||||
@@ -1055,6 +1068,10 @@ else {
|
|||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
'DisableDVR' {
|
||||||
|
RegImport "> Disabling Xbox game DVR..." $PSScriptRoot\Regfiles\Disable_DVR.reg
|
||||||
|
continue
|
||||||
|
}
|
||||||
'ClearStart' {
|
'ClearStart' {
|
||||||
ClearStartMenu "> Removing all pinned apps from the start menu..."
|
ClearStartMenu "> Removing all pinned apps from the start menu..."
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user