From fdd32f441f0162dcc87a78d5614e035c08464596 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Wed, 16 Oct 2024 15:33:17 +0000 Subject: [PATCH 1/5] =?UTF-8?q?Deploying=20to=20main=20from=20@=20ChrisTit?= =?UTF-8?q?usTech/winutil@e4565f1f6feb6ae1dc654970f682b831abbb38cf=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a426dc89..676f713f 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win These are the sponsors that help keep this project alive with monthly contributions. -Yusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattRMSStefanthaddlPaulDave JonesAnthony MendezxPandakuClaudemodsTimothy CookMaxDursleyGuyMITH ツSandman616 +Yusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattRMSStefanPaulDave JonesAnthony MendezxPandakuClaudemodsTimothy CookMaxDursleyGuyMITH ツSandman616 ## 🏅 Thanks to all Contributors Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. From fe19094395584832e5de9acfbdb0309d7d4f2221 Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Wed, 23 Oct 2024 15:33:11 +0000 Subject: [PATCH 2/5] =?UTF-8?q?Deploying=20to=20main=20from=20@=20ChrisTit?= =?UTF-8?q?usTech/winutil@fdd32f441f0162dcc87a78d5614e035c08464596=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 676f713f..786caffc 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win These are the sponsors that help keep this project alive with monthly contributions. -Yusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattRMSStefanPaulDave JonesAnthony MendezxPandakuClaudemodsTimothy CookMaxDursleyGuyMITH ツSandman616 +Yusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattRMSStefanPaulDave JonesAnthony MendezxPandakuClaudemodsTimothy CookMaxDursleyGuyMITH ツSandman616 ## 🏅 Thanks to all Contributors Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. From c6a832b0062faf67e22bbf37286cb3571876617c Mon Sep 17 00:00:00 2001 From: ChrisTitusTech Date: Thu, 24 Oct 2024 15:33:00 +0000 Subject: [PATCH 3/5] =?UTF-8?q?Deploying=20to=20main=20from=20@=20ChrisTit?= =?UTF-8?q?usTech/winutil@fe19094395584832e5de9acfbdb0309d7d4f2221=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 786caffc..112794b5 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win These are the sponsors that help keep this project alive with monthly contributions. -Yusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattRMSStefanPaulDave JonesAnthony MendezxPandakuClaudemodsTimothy CookMaxDursleyGuyMITH ツSandman616 +Yusuke SaitoTriHyderaMark AmosJason A. DiegmuellerwyattRMSStefanPaulDave JonesAnthony MendezxPandakuClaudemodsTimothy CookMaxDursleyGuySandman616 ## 🏅 Thanks to all Contributors Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. From 5640f9d04cb209d05e1ab5f2d8864134599f716d Mon Sep 17 00:00:00 2001 From: LoopTJ <34551682+LoopTJ@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:43:33 -0700 Subject: [PATCH 4/5] Disable Recall (#2974) Adds Tweak option to Disable MS Recall using DISM and Reg Key. --- config/tweaks.json | 30 ++++++ .../tweaks/Essential-Tweaks/DisableRecall.md | 91 +++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 docs/dev/tweaks/Essential-Tweaks/DisableRecall.md diff --git a/config/tweaks.json b/config/tweaks.json index 56729164..2a6bf95e 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -2584,6 +2584,36 @@ ], "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot" }, + "WPFTweaksRecallOff": { + "Content": "Disable Recall", + "Description": "Turn Recall off", + "category": "Essential Tweaks", + "panel": "1", + "Order": "a011_", + "registry": [ + { + + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsAI", + "Name": "DisableAIDataAnalysis", + "Type": "DWord", + "Value": "1", + "OriginalValue": "0" + } + ], + "InvokeScript": [ + " + Write-Host \"Disable Recall\" + DISM /Online /Disable-Feature /FeatureName:Recall + " + ], + "UndoScript": [ + " + Write-Host \"Enable Recall\" + DISM /Online /Enable-Feature /FeatureName:Recall + " + ], + "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DisableRecall" + }, "WPFTweaksDisableLMS1": { "Content": "Disable Intel MM (vPro LMS)", "Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.", diff --git a/docs/dev/tweaks/Essential-Tweaks/DisableRecall.md b/docs/dev/tweaks/Essential-Tweaks/DisableRecall.md new file mode 100644 index 00000000..6635a7dc --- /dev/null +++ b/docs/dev/tweaks/Essential-Tweaks/DisableRecall.md @@ -0,0 +1,91 @@ +# Disable Microsoft Recall + +Last Updated: 2024-10-24 + + +!!! info + The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.** +## Description + +Disables MS Recall built into Windows since 24H2. + + + + + +
+Preview Code + +```json +"WPFTweaksRecallOff": { + "Content": "Disable Recall", + "Description": "Turn Recall off", + "category": "Essential Tweaks", + "panel": "1", + "Order": "a011_", + "registry": [ + { + + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsAI", + "Name": "DisableAIDataAnalysis", + "Type": "DWord", + "Value": "1", + "OriginalValue": "0" + } + ], + "InvokeScript": [ + " + Write-Host \"Disable Recall\" + DISM /Online /Disable-Feature /FeatureName:Recall + " + ], + "UndoScript": [ + " + Write-Host \"Enable Recall\" + DISM /Online /Enable-Feature /FeatureName:Recall + " + ], + "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DisableRecall" + }, +``` + +
+ +## Invoke Script + +```powershell + + Write-Host "Disable Recall" + DISM /Online /Disable-Feature /FeatureName:Recall + + +``` +## Undo Script + +```powershell + + Write-Host "Enable Recall" + DISM /Online /Enable-Feature /FeatureName:Recall + + +``` +## Registry Changes +Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. + + +You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). + +### Registry Key: DisableAIDataAnalysis + +**Type:** DWord + +**Original Value:** 0 + +**New Value:** 1 + + + + + + +[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) From bfaba1419101d90fd6354e45c4c81180eb1f65a5 Mon Sep 17 00:00:00 2001 From: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:45:24 +0200 Subject: [PATCH 5/5] [MicroWin] Fix Recall "Dependency" Misinformation (#2947) Fixed the misinformation caused by the Recall feature. Thanks @WitherOrNot and @thecatontheceiling for spotting the problem --- .../private/Invoke-WinUtilMicroWin-Helper.ps1 | 26 ++++++++++++++++- functions/public/Invoke-WPFMicrowin.ps1 | 29 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 b/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 index b38dc2a2..c1ca7ad0 100644 --- a/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 +++ b/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 @@ -110,7 +110,6 @@ function Remove-Features() { $_.FeatureName -NotLike "*NFS*" -AND $_.FeatureName -NotLike "*SearchEngine*" -AND $_.FeatureName -NotLike "*RemoteDesktop*" -AND - $_.FeatureName -NotLike "*Recall*" -AND $_.State -ne "Disabled" } @@ -277,6 +276,31 @@ function Remove-ProvisionedPackages() { } } +function Get-LocalizedUsers +{ + <# + .SYNOPSIS + Gets a localized user group representation for ICACLS commands (Port from DISMTools PE Helper) + .PARAMETER admins + Determines whether to get a localized user group representation for the Administrators user group + .OUTPUTS + A string containing the localized user group + .EXAMPLE + Get-LocalizedUsers -admins $true + #> + param ( + [Parameter(Mandatory = $true, Position = 0)] [bool]$admins + ) + if ($admins) + { + return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-544" }).Name + } + else + { + return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-545" }).Name + } +} + function Copy-ToUSB([string]$fileToCopy) { foreach ($volume in Get-Volume) { if ($volume -and $volume.FileSystemLabel -ieq "ventoy") { diff --git a/functions/public/Invoke-WPFMicrowin.ps1 b/functions/public/Invoke-WPFMicrowin.ps1 index 4b90a5bc..966d6a07 100644 --- a/functions/public/Invoke-WPFMicrowin.ps1 +++ b/functions/public/Invoke-WPFMicrowin.ps1 @@ -162,6 +162,35 @@ public class PowerManagement { Write-Host "Removing Appx Bloat" Remove-ProvisionedPackages + # Detect Windows 11 24H2 and add dependency to FileExp to prevent Explorer look from going back - thanks @WitherOrNot and @thecatontheceiling + if ((Test-CompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) + { + try + { + if (Test-Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" -PathType Leaf) + { + # Found the culprit. Do the following: + + # 1. Take ownership of the file, from TrustedInstaller to Administrators + takeown /F "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /A + + # 2. Set ACLs so that we can write to it + icacls "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /grant "$(Get-LocalizedUsers -admins $true):(M)" | Out-Host + + # 3. Open the file and do the modification + $appxManifest = Get-Content -Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" + $originalLine = $appxManifest[13] + $dependency = "`n " + $appxManifest[13] = "$originalLine$dependency" + Set-Content -Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" -Value $appxManifest -Force -Encoding utf8 + } + } + catch + { + + } + } + Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory