mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
Added option to disable Windows Recall AI snapshots (#61)
Removed code for migrating LastSettings file to SavedSettings
This commit is contained in:
1
Get.ps1
1
Get.ps1
@@ -22,6 +22,7 @@ param (
|
||||
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
||||
[switch]$HideTaskview,
|
||||
[switch]$DisableCopilot,
|
||||
[switch]$DisableRecall,
|
||||
[switch]$DisableWidgets,
|
||||
[switch]$HideWidgets,
|
||||
[switch]$DisableChat,
|
||||
|
||||
@@ -28,6 +28,7 @@ through all the settings yourself, or removing apps one by one!
|
||||
- Disable & remove bing search & cortana in Windows search.
|
||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications, windows explorer, and on the lockscreen.
|
||||
- Disable Windows Copilot. (Windows 11 build 22621+)
|
||||
- Disable Windows Recall snapshots. (Windows 11 build 22621+)
|
||||
- Restore the old Windows 10 style context menu. (Windows 11 build 22000+)
|
||||
- Show hidden files, folders and drives.
|
||||
- Show file extensions for known file types.
|
||||
|
||||
@@ -23,9 +23,10 @@ You can pick and choose exactly which modifications you want the script to make,
|
||||
- Disable telemetry, diagnostic data, app-launch tracking & targeted ads.
|
||||
- Disable tips, tricks, suggestions and ads in start, settings, notifications, Windows explorer, and on the lockscreen.
|
||||
|
||||
#### Bing & Copilot
|
||||
#### Bing, Copilot & More
|
||||
- Disable & remove bing search & cortana in Windows search.
|
||||
- Disable Windows Copilot. (Windows 11 only)
|
||||
- Disable Windows Recall snapshots. (Windows 11 only)
|
||||
|
||||
#### Windows Explorer
|
||||
- Show hidden files, folders and drives.
|
||||
@@ -297,6 +298,7 @@ The quick and advanced method support parameters to tailor the behaviour of the
|
||||
| -ShowSearchBoxTb | Show search box on the taskbar. (Windows 11 only) |
|
||||
| -HideTaskview | Hide the taskview button from the taskbar. (Windows 11 only) |
|
||||
| -DisableCopilot | Disable Windows copilot. (Windows 11 only) |
|
||||
| -DisableRecall | Disable Windows Recall snapshots. (Windows 11 only) |
|
||||
| -DisableWidgets | Disable the widget service & hide the widget (news and interests) icon from the taskbar. |
|
||||
| -HideChat | Hide the chat (meet now) icon from the taskbar. |
|
||||
| -HideOnedrive | Hide the onedrive folder in the Windows explorer sidepanel. (Windows 10 only) |
|
||||
|
||||
7
Regfiles/Disable_AI_Recall.reg
Normal file
7
Regfiles/Disable_AI_Recall.reg
Normal file
@@ -0,0 +1,7 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI]
|
||||
"DisableAIDataAnalysis"=dword:00000001
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsAI]
|
||||
"DisableAIDataAnalysis"=dword:00000001
|
||||
10
Regfiles/Undo/Enable_AI_Recall.reg
Normal file
10
Regfiles/Undo/Enable_AI_Recall.reg
Normal file
@@ -0,0 +1,10 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\WindowsAI\DisableAIDataAnalysis]
|
||||
"value"=dword:00000000
|
||||
|
||||
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI]
|
||||
"DisableAIDataAnalysis"=-
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsAI]
|
||||
"DisableAIDataAnalysis"=-
|
||||
@@ -23,6 +23,7 @@ param (
|
||||
[switch]$HideSearchTb, [switch]$ShowSearchIconTb, [switch]$ShowSearchLabelTb, [switch]$ShowSearchBoxTb,
|
||||
[switch]$HideTaskview,
|
||||
[switch]$DisableCopilot,
|
||||
[switch]$DisableRecall,
|
||||
[switch]$DisableWidgets,
|
||||
[switch]$HideWidgets,
|
||||
[switch]$DisableChat,
|
||||
@@ -544,22 +545,9 @@ foreach ($Param in $SPParams) {
|
||||
}
|
||||
}
|
||||
|
||||
# Check if SavedSettings file exists, if it doesn't exist check if LastSettings file exists
|
||||
if (Test-Path "$PSScriptRoot/SavedSettings") {
|
||||
if ([String]::IsNullOrWhiteSpace((Get-content "$PSScriptRoot/SavedSettings"))) {
|
||||
# Remove SavedSettings file if it's empty
|
||||
Remove-Item -Path "$PSScriptRoot/SavedSettings" -recurse
|
||||
}
|
||||
}
|
||||
elseif (Test-Path "$PSScriptRoot/LastSettings") {
|
||||
if ([String]::IsNullOrWhiteSpace((Get-content "$PSScriptRoot/LastSettings"))) {
|
||||
# Remove LastSettings file if it's empty
|
||||
Remove-Item -Path "$PSScriptRoot/LastSettings" -recurse
|
||||
}
|
||||
else {
|
||||
# Rename LastSettings file to SavedSettings if it isn't empty
|
||||
Rename-Item -Path "$PSScriptRoot/LastSettings" -NewName "$PSScriptRoot/SavedSettings"
|
||||
}
|
||||
# Remove SavedSettings file if it exists and is empty
|
||||
if (Test-Path "$PSScriptRoot/SavedSettings" -and [String]::IsNullOrWhiteSpace((Get-content "$PSScriptRoot/SavedSettings"))) {
|
||||
Remove-Item -Path "$PSScriptRoot/SavedSettings" -recurse
|
||||
}
|
||||
|
||||
# Only run the app selection form if the 'RunAppConfigurator' parameter was passed to the script
|
||||
@@ -752,6 +740,12 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or ($SPP
|
||||
if ($( Read-Host -Prompt "Disable Windows Copilot? This applies to all users (y/n)" ) -eq 'y') {
|
||||
AddParameter 'DisableCopilot' 'Disable Windows copilot'
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
|
||||
if ($( Read-Host -Prompt "Disable Windows Recall snapshots? This applies to all users (y/n)" ) -eq 'y') {
|
||||
AddParameter 'DisableRecall' 'Disable Windows Recall snapshots'
|
||||
}
|
||||
}
|
||||
|
||||
# Only show this option for Windows 11 users running build 22000 or later
|
||||
@@ -1131,6 +1125,10 @@ else {
|
||||
RegImport "> Disabling Windows copilot..." $PSScriptRoot\Regfiles\Disable_Copilot.reg
|
||||
continue
|
||||
}
|
||||
'DisableRecall' {
|
||||
RegImport "> Disabling Windows Recall snapshots..." $PSScriptRoot\Regfiles\Disable_AI_Recall.reg
|
||||
continue
|
||||
}
|
||||
{$_ -in "HideWidgets", "DisableWidgets"} {
|
||||
RegImport "> Disabling the widget service and hiding the widget icon from the taskbar..." $PSScriptRoot\Regfiles\Disable_Widgets_Taskbar.reg
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user