Merge pull request #502 from Romanitho/fix-scope
Fix machine scope when running as systempull/506/head
commit
736239d230
|
@ -3,7 +3,7 @@ function Add-ScopeMachine {
|
||||||
|
|
||||||
#Get Settings path for system or current user
|
#Get Settings path for system or current user
|
||||||
if ([System.Security.Principal.WindowsIdentity]::GetCurrent().IsSystem) {
|
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 {
|
else {
|
||||||
$SettingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json"
|
$SettingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json"
|
||||||
|
|
Loading…
Reference in New Issue