Update winget-upgrade.ps1

pull/3/head
Romain 2022-02-20 10:40:20 +01:00 committed by GitHub
parent d5a8ad2873
commit 91279e1753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -72,6 +72,7 @@ function Start-NotifTask ($Title,$Message,$MessageType,$Balise) {
#Check if running account is system or interactive logon #Check if running account is system or interactive logon
$currentPrincipal = [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-4") $currentPrincipal = [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-4")
#if not "Interactive" user, run as system
if ($currentPrincipal -eq $false){ if ($currentPrincipal -eq $false){
#Save XML to File #Save XML to File
$ToastTemplateLocation = "$env:ProgramData\Winget-AutoUpdate\" $ToastTemplateLocation = "$env:ProgramData\Winget-AutoUpdate\"