diff --git a/scripts/Windows/Scripts/Software.ps1 b/scripts/Windows/Scripts/Software.ps1 index 39f9ed41..e91dab19 100644 --- a/scripts/Windows/Scripts/Software.ps1 +++ b/scripts/Windows/Scripts/Software.ps1 @@ -12,7 +12,7 @@ $null = New-Module { [scriptblock] $Configurator = { }, [scriptblock] $UserConfigurator = { }, [InstallerAction] $Action = [InstallerAction]::Install, - [hashtable] $Arguments + [hashtable] $Arguments = @{ } ) if (-not $Name) { @@ -45,7 +45,8 @@ $null = New-Module { foreach ($user in Get-Users) { $Arguments.Add($userArgument, $user); - & $installHandler -Action ([InstallerAction]::ConfigureUser) -Arguments $Arguments; + $argumentList.Add("action", [InstallerAction]::ConfigureUser); + & $installHandler @argumentList; } } elseif ($Action -eq ([InstallerAction]::ConfigureUser)) { if ((-not $Arguments.ContainsKey($userArgument)) -or ($null -eq $Arguments[$userArgument])) {