Fix incorrect script
This commit is contained in:
parent
2f6ee57525
commit
edd97b991f
1 changed files with 2 additions and 1 deletions
|
@ -84,13 +84,14 @@ function Set-UACState([bool] $value) {
|
|||
|
||||
function Enable-UACNextLogin([Context] $context) {
|
||||
Set-UACState $true;
|
||||
$key = Get-SystemPolicyKey;
|
||||
|
||||
$action = New-ScheduledTaskAction -Execute "pwsh.exe" -Argument (
|
||||
[string]::Join(
|
||||
" ",
|
||||
@(
|
||||
"-c",
|
||||
"Set-ItemProperty '$keyPath' -Name '$propertyName' -Value 0;",
|
||||
"Set-ItemProperty '$($key.PSPath)' -Name 'EnableLUA' -Value 0;",
|
||||
"Unregister-ScheduledTask -Force '$uacDisablerName';",
|
||||
". '$PSScriptRoot/../Scripts/Context.ps1';",
|
||||
"`$context = [Context]::new();",
|
||||
|
|
Loading…
Reference in a new issue