Fix machine scope when running as system

pull/502/head
romanitho 2023-11-29 02:04:17 +01:00
parent ffe65ffa34
commit 2f7c804680
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ function Add-ScopeMachine {
#Get Settings path for system or current user
if ([System.Security.Principal.WindowsIdentity]::GetCurrent().IsSystem) {
$SettingsPath = "$Env:windir\System32\config\systemprofile\AppData\Local\Microsoft\WinGet\Settings\settings.json"
$SettingsPath = "$Env:windir\System32\config\systemprofile\AppData\Local\Microsoft\WinGet\Settings\defaultState\settings.json"
}
else {
$SettingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json"