Ensure only one user is enabled at once

This commit is contained in:
Manuel Thalmann 2024-08-27 14:11:31 +02:00
parent caffde0a01
commit 95b0f0994e

View file

@ -453,6 +453,7 @@ $null = New-Module {
} }
([UserStage]::Cleanup) { ([UserStage]::Cleanup) {
$user = Get-SetupUser; $user = Get-SetupUser;
Disable-LocalUser $name;
Enable-LocalUser $user; Enable-LocalUser $user;
Set-AutologinUser $user; Set-AutologinUser $user;
Unregister-WslDistribution; Unregister-WslDistribution;
@ -464,6 +465,10 @@ $null = New-Module {
} }
} }
foreach ($user in $users) {
Enable-LocalUser $user;
}
Set-IsFinished $true; Set-IsFinished $true;
} }
} }