diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 71374bab..df3b7841 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -110,10 +110,10 @@ function Enable-UACNextLogin([Context] $context) { "Set-ItemProperty '$($key.PSPath)' -Name 'EnableLUA' -Value 0 -Type DWord;", "Unregister-ScheduledTask -Confirm:`$false '$autoLoginName';", "Unregister-ScheduledTask -Confirm:`$false '$uacDisablerName';", - "`$context.Remove('$autoLoginTriggerProperty');", - "`$context.Remove('$uacDisablerTriggerProperty');", ". '$PSScriptRoot/../Scripts/Context.ps1';", "`$context = [Context]::new();", + "`$context.Remove('$autoLoginTriggerProperty');", + "`$context.Remove('$uacDisablerTriggerProperty');", "`$context.DeregisterNewUserReboot();", "Restart-Computer -Force;")));