From 91279e1753b1cc2c34dba529470d9527bf29a314 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Sun, 20 Feb 2022 10:40:20 +0100 Subject: [PATCH] Update winget-upgrade.ps1 --- Winget-AutoUpdate/winget-upgrade.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index d6e991d..baf167d 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -72,6 +72,7 @@ function Start-NotifTask ($Title,$Message,$MessageType,$Balise) { #Check if running account is system or interactive logon $currentPrincipal = [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-4") + #if not "Interactive" user, run as system if ($currentPrincipal -eq $false){ #Save XML to File $ToastTemplateLocation = "$env:ProgramData\Winget-AutoUpdate\"