Configure user only outside of setup

This commit is contained in:
Manuel Thalmann 2024-08-07 23:30:29 +02:00
parent e638133021
commit c15579f919

View file

@ -180,12 +180,12 @@ $null = New-Module {
if ($action -eq ([InstallerAction]::Install)) {
Write-Host "Installing $Name";
& $Installer @argumentList;
# ToDo: Automatically configure after installation
} elseif ($Action -eq ([InstallerAction]::Configure)) {
Write-Host "Configuring $Name";
& $Configurator @argumentList;
foreach ($user in Get-Users) {
$Arguments.Add($userArgument, $user);
if (-not (Test-SetupUser)) {
$argumentList.Add("action", [InstallerAction]::ConfigureUser);
& $installHandler @argumentList;
}