diff --git a/scripts/Windows/Scripts/Software.ps1 b/scripts/Windows/Scripts/Software.ps1 index 30530345..f8000804 100644 --- a/scripts/Windows/Scripts/Software.ps1 +++ b/scripts/Windows/Scripts/Software.ps1 @@ -16,11 +16,11 @@ $null = New-Module { [hashtable] $Arguments ) + if (-not $Name) { + $Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName)); + } + Start-Operation { - if (-not $Name) { - $Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName)); - } - if ($null -ne $Name) { $Name = "``$Name``"; } else {