Change name of UAC disabler
This commit is contained in:
parent
94a5f09aa4
commit
1aabdc228e
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue