From 12c7e68086a642571134dd7edf313e4903b59fc9 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 29 Jun 2023 19:18:50 +0200 Subject: [PATCH] Store task name in function --- scripts/Windows/OS/User.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 3cc75303..64689800 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -1,5 +1,4 @@ . "$PSScriptRoot/../Scripts/Context.ps1"; -$uacDisablerName = "PortValhalla UAC Disabler"; $taskTrigger = 1337; function New-PersonalUser([Context] $context) @@ -76,6 +75,7 @@ function Set-UACState([bool] $value) { function Enable-UACNextLogin([Context] $context) { Set-UACState $true; $tempTask = "PortValhalla Temp"; + $uacDisablerName = "PortValhalla UAC Disabler"; $key = Get-SystemPolicyKey; $action = New-ScheduledTaskAction -Execute "pwsh.exe" -Argument (