mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-07-03 07:08:27 +00:00
fix(app-removal): don't treat AllUsers/CurrentUser as a username at startup (#647)
This commit is contained in:
@@ -423,7 +423,11 @@ if ($script:Params.ContainsKey("User")) {
|
|||||||
GetUserDirectory -userName $script:Params.Item("User") | Out-Null
|
GetUserDirectory -userName $script:Params.Item("User") | Out-Null
|
||||||
}
|
}
|
||||||
if ($script:Params.ContainsKey("AppRemovalTarget")) {
|
if ($script:Params.ContainsKey("AppRemovalTarget")) {
|
||||||
GetUserDirectory -userName $script:Params.Item("AppRemovalTarget") | Out-Null
|
$appRemovalTargetValue = $script:Params.Item("AppRemovalTarget")
|
||||||
|
# 'AllUsers' / 'CurrentUser' are sentinel scope values, not real usernames - don't resolve them as a profile
|
||||||
|
if ($appRemovalTargetValue -notin @('AllUsers', 'CurrentUser')) {
|
||||||
|
GetUserDirectory -userName $appRemovalTargetValue | Out-Null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove LastUsedSettings.json file if it exists and is empty
|
# Remove LastUsedSettings.json file if it exists and is empty
|
||||||
|
|||||||
Reference in New Issue
Block a user