From afdb66b5d41f581a3535d22934fc0374e9eb2d7e Mon Sep 17 00:00:00 2001 From: Jeffrey <9938813+Raphire@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:26:55 +0100 Subject: [PATCH] Fix crash on clearing Start menu pinned apps for all users (#447) As reported in #445 --- Win11Debloat.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 4337791..66dcab9 100755 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -2228,12 +2228,12 @@ function GetUserDirectory { $exitIfPathNotFound = $true ) - if (-not (CheckIfUserExists -userName $userName)) { - Write-Error "User $userName does not exist on this system" - AwaitKeyToExit - } - try { + if (-not (CheckIfUserExists -userName $userName) -and $userName -ne "*") { + Write-Error "User $userName does not exist on this system" + AwaitKeyToExit + } + $userDirectoryExists = Test-Path "$env:SystemDrive\Users\$userName" $userPath = "$env:SystemDrive\Users\$userName\$fileName"