From bcc801683d97ccdef0d4d921be3e0a3a2e344346 Mon Sep 17 00:00:00 2001 From: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:40:04 +0100 Subject: [PATCH] [Tweaks] Disable output for DISM for the Recall tweak (#3154) * Fixed lock caused by expected input for DISM This is the main event * Miscellaneous file Don't know why this file was modified by the compile preprocessor --- config/tweaks.json | 6 ++++-- functions/private/Set-WinUtilRegistry.ps1 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/tweaks.json b/config/tweaks.json index d8e5f862..36f80567 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -2596,13 +2596,15 @@ "InvokeScript": [ " Write-Host \"Disable Recall\" - DISM /Online /Disable-Feature /FeatureName:Recall + DISM /Online /Disable-Feature /FeatureName:Recall /Quiet /NoRestart + Write-Host \"Please restart your computer in order for the changes to be fully applied.\" " ], "UndoScript": [ " Write-Host \"Enable Recall\" - DISM /Online /Enable-Feature /FeatureName:Recall + DISM /Online /Enable-Feature /FeatureName:Recall /Quiet /NoRestart + Write-Host \"Please restart your computer in order for the changes to be fully applied.\" " ], "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DisableRecall" diff --git a/functions/private/Set-WinUtilRegistry.ps1 b/functions/private/Set-WinUtilRegistry.ps1 index b926d5dc..e99aa669 100644 --- a/functions/private/Set-WinUtilRegistry.ps1 +++ b/functions/private/Set-WinUtilRegistry.ps1 @@ -47,7 +47,7 @@ function Set-WinUtilRegistry { Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" } catch [System.Management.Automation.ItemNotFoundException] { Write-Warning $psitem.Exception.ErrorRecord - } catch [System.UnauthorizedAccessException]{ + } catch [System.UnauthorizedAccessException] { Write-Warning $psitem.Exception.Message } catch { Write-Warning "Unable to set $Name due to unhandled exception"