Skip to content

Commit

Permalink
Decouple executablePath from iconLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
emtuls committed Jan 19, 2024
1 parent c01de4d commit 0fd821c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/common.vm/tools/vm.common/vm.common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -295,7 +299,7 @@ function VM-Install-Shortcut{
TargetPath = $executableCmd
Arguments = $executableArgs
WorkingDirectory = $executableDir
IconLocation = $executablePath
IconLocation = $iconLocation
}
if ($runAsAdmin) {
$packageArgs.RunAsAdmin = $true
Expand Down

0 comments on commit 0fd821c

Please sign in to comment.