From 8423c760f8d31b0ea88c542a00d54a2ffed9bfae Mon Sep 17 00:00:00 2001 From: dyoder Date: Fri, 31 Jul 2020 18:48:18 -0400 Subject: [PATCH] update --- Upgrade-DeltekVision.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Upgrade-DeltekVision.ps1 b/Upgrade-DeltekVision.ps1 index 07bf0b7..9155ba7 100644 --- a/Upgrade-DeltekVision.ps1 +++ b/Upgrade-DeltekVision.ps1 @@ -19,6 +19,9 @@ If ( Test-Path $APP_PATH ) Write-Output "Deltek Vision was successfully uninstalled." } +## Remove the existing shortcut +If ( Test-Path "${Env:UserProfile}\Desktop\Deltek Vision.lnk" ) { Remove-Item -Path "${Env:UserProfile}\Desktop\Deltek Vision.lnk" -Force } + ## Get the correct path to IE If ( Test-Path "${Env:ProgramFiles(x86)}" ) { $IEPATH = "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe" } Else { $IEPATH = "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe" } @@ -27,7 +30,7 @@ Else { $IEPATH = "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe" } If ( Test-Path $IEPATH ) { $WshShell = New-Object -ComObject WScript.Shell - $Shortcut = $WshShell.CreateShortcut("${Env:UserProfile}\Desktop\Deltek Vision 3.lnk") + $Shortcut = $WshShell.CreateShortcut("${Env:UserProfile}\Desktop\Deltek Vision.lnk") $Shortcut.Arguments = 'https://dbia.deltekfirst.com/DBIAClient/DeltekVision.application' $Shortcut.Description = "Launch Deltek Vision" $Shortcut.IconLocation = "${IEPATH}, 0"