From 95b0f0994ec8f6e554c7256bda4de08d8ffbd664 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 27 Aug 2024 14:11:31 +0200 Subject: [PATCH] Ensure only one user is enabled at once --- scripts/Windows/OS/Install.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index b46f9bb2..c176135c 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -453,6 +453,7 @@ $null = New-Module { } ([UserStage]::Cleanup) { $user = Get-SetupUser; + Disable-LocalUser $name; Enable-LocalUser $user; Set-AutologinUser $user; Unregister-WslDistribution; @@ -464,6 +465,10 @@ $null = New-Module { } } + foreach ($user in $users) { + Enable-LocalUser $user; + } + Set-IsFinished $true; } }