From 98dfa910bed9e753cbd97ed3d355d3754125d448 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 3 Jul 2023 13:43:58 +0200 Subject: [PATCH] Fix incorrect order of commands --- scripts/Windows/OS/User.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;")));