Remove unnecessary config values

This commit is contained in:
Manuel Thalmann 2023-06-30 12:01:18 +02:00
parent 821db151cb
commit 8e4f0ccd9a

View file

@ -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();",