diff --git a/packages/common.vm/common.vm.nuspec b/packages/common.vm/common.vm.nuspec index 6b1df00a4..cf6812ebf 100755 --- a/packages/common.vm/common.vm.nuspec +++ b/packages/common.vm/common.vm.nuspec @@ -2,7 +2,7 @@ common.vm - 0.0.0.20240117 + 0.0.0.20240118 Common libraries for VM-packages Mandiant diff --git a/packages/common.vm/tools/vm.common/vm.common.psm1 b/packages/common.vm/tools/vm.common/vm.common.psm1 index 10a18f1ec..7e18e262e 100755 --- a/packages/common.vm/tools/vm.common/vm.common.psm1 +++ b/packages/common.vm/tools/vm.common/vm.common.psm1 @@ -275,11 +275,15 @@ function VM-Install-Shortcut{ [Parameter(Mandatory=$false)] [string] $executableDir, [Parameter(Mandatory=$false)] - [string] $arguments = "" + [string] $arguments = "", + [Parameter(Mandatory=$false)] + [string] $iconLocation ) $shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category $shortcut = Join-Path $shortcutDir "$toolName.lnk" + if (-Not $iconLocation) {$iconLocation = $executablePath} + if ($consoleApp) { if (!$executableDir) { $executableDir = Join-Path ${Env:UserProfile} "Desktop" @@ -295,7 +299,7 @@ function VM-Install-Shortcut{ TargetPath = $executableCmd Arguments = $executableArgs WorkingDirectory = $executableDir - IconLocation = $executablePath + IconLocation = $iconLocation } if ($runAsAdmin) { $packageArgs.RunAsAdmin = $true