Update winget-upgrade.ps1
parent
d5a8ad2873
commit
91279e1753
|
@ -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\"
|
||||||
|
|
Loading…
Reference in New Issue