Store task name in function

This commit is contained in:
Manuel Thalmann 2023-06-29 19:18:50 +02:00
parent 6f011a2600
commit 12c7e68086

View file

@ -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 (