diff --git a/scripts/Common/Scripts/Software.ps1 b/scripts/Common/Scripts/Software.ps1 index b0cbfa35..136cca04 100644 --- a/scripts/Common/Scripts/Software.ps1 +++ b/scripts/Common/Scripts/Software.ps1 @@ -149,10 +149,18 @@ $null = New-Module { [scriptblock] $Installer = { }, [scriptblock] $Configurator = { }, [scriptblock] $UserConfigurator = { }, - [InstallerAction] $Action = [InstallerAction]::Install, + [Nullable[InstallerAction]] $Action, [hashtable] $Arguments ) + [InstallerAction] $Action = & { + if ($Action.HasValue) { + $Action; + } else { + [InstallerAction]::Install; + } + }; + if (-not $Name) { $Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName)); }