Fix deletion of unnecessary tasks

This commit is contained in:
Manuel Thalmann 2023-06-30 11:57:50 +02:00
parent 57f4ffd0e4
commit 0317031d9a

View file

@ -82,6 +82,8 @@ function Set-UACState([bool] $value) {
function Enable-UACNextLogin([Context] $context) {
Set-UACState $true;
$tempTask = "PortValhalla Temp";
$autoLoginName = "PortValhalla AutoLogin Setup";
$uacDisablerName = "PortValhalla UAC Disabler";
$autoLoginTrigger = Get-Random -Maximum 65535;
$uacDisablerTrigger = Get-Random -Maximum 65535;
@ -92,7 +94,7 @@ function Enable-UACNextLogin([Context] $context) {
$optionCollection = [System.Tuple[int, string, string[]][]]@(
[System.Tuple]::Create(
$autoLoginTrigger,
"PortValhalla AutoLogin Setup",
$autoLoginName,
@(
". '$PSScriptRoot/../Scripts/Context.ps1';",
"`$context = [Context]::new();",