Fix store suggestions not getting disabled correctly for all users when running as other user (#642)

This commit is contained in:
Jeffrey
2026-06-21 01:56:28 +02:00
committed by GitHub
parent 6e4a616f1c
commit 908274a500
4 changed files with 144 additions and 30 deletions

View File

@@ -125,7 +125,10 @@ function ExecuteParameter {
}
Write-Host "> Disabling Microsoft Store search suggestions for user $(GetUserName)..."
DisableStoreSearchSuggestions
$storeDb = GetStoreAppsDatabasePathForUser -UserName (GetUserName)
if ($storeDb) {
DisableStoreSearchSuggestions -StoreAppsDatabase $storeDb
}
Write-Host ""
return
}
@@ -289,7 +292,10 @@ function Invoke-UndoFeatureAction {
}
Write-Host "> Re-enabling Microsoft Store search suggestions for user $(GetUserName)..."
EnableStoreSearchSuggestions
$storeDb = GetStoreAppsDatabasePathForUser -UserName (GetUserName)
if ($storeDb) {
EnableStoreSearchSuggestions -StoreAppsDatabase $storeDb
}
Write-Host ""
return
}