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

@@ -50,10 +50,7 @@ function Test-FeatureApplied {
return (Test-StoreSearchSuggestionsDisabledForAllUsers)
}
$storeDbPath = "$env:LocalAppData\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db"
if ($script:Params.ContainsKey('User')) {
$storeDbPath = GetUserDirectory -userName "$(GetUserName)" -fileName "AppData\Local\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalState\store.db" -exitIfPathNotFound $false
}
$storeDbPath = GetStoreAppsDatabasePathForUser -UserName (GetUserName)
return (Test-StoreSearchSuggestionsDisabled -StoreAppsDatabase $storeDbPath)
}