From 3f81a38da5a319a838f7f745b334113e187a2fdf Mon Sep 17 00:00:00 2001 From: romanitho <96626929+Romanitho@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:06:45 +0100 Subject: [PATCH] Fix machine scope --- winget-install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winget-install.ps1 b/winget-install.ps1 index ba5c227..8780f08 100644 --- a/winget-install.ps1 +++ b/winget-install.ps1 @@ -83,7 +83,7 @@ function Get-WingetCmd { 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"