diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 8fb7fae2..bef3a5d2 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -1,4 +1,5 @@ . "$PSScriptRoot/../Scripts/Context.ps1"; +$uacDisablerName = "PortValhalla UAC Disabler"; function New-PersonalUser([Context] $context) { @@ -42,7 +43,6 @@ function New-PersonalUser([Context] $context) } function Enable-UACNextLogin() { - $taskName = "PortValhalla"; $keyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"; $propertyName = "EnableLUA"; $null = Set-ItemProperty "$keyPath" -Name "$propertyName" -Value 1; @@ -57,5 +57,5 @@ function Enable-UACNextLogin() { $trigger = New-ScheduledTaskTrigger -AtLogOn; $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest; $task = New-ScheduledTask -Action $action -Principal $principal -Trigger $trigger; - $null = Register-ScheduledTask $taskName -InputObject $task; + $null = Register-ScheduledTask $uacDisablerName -InputObject $task; }