From 8e4f0ccd9a25ee14fff0161940cd4c88a82f6292 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 30 Jun 2023 12:01:18 +0200 Subject: [PATCH] Remove unnecessary config values --- scripts/Windows/OS/User.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 02b59d51..71374bab 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -101,6 +101,7 @@ function Enable-UACNextLogin([Context] $context) { "`$username = `$context.Get('$preparedUsernameProperty');", "`$password = `$context.Get('$preparedPasswordProperty');", "`$context.SetAutologin(`$username, `$password);", + "`$context.Remove('$preparedUsernameProperty');", "`$context.Remove('$preparedPasswordProperty');")), [System.Tuple]::Create( $uacDisablerTrigger, @@ -109,6 +110,8 @@ 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.DeregisterNewUserReboot();",