Configure user only outside of setup

This commit is contained in:
Manuel Thalmann 2024-08-07 23:30:29 +02:00
parent 1be771628b
commit 875013b104

View file

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