diff --git a/Install-DeltekVision.ps1 b/Install-DeltekVision.ps1 index 97611b7..45cb989 100644 --- a/Install-DeltekVision.ps1 +++ b/Install-DeltekVision.ps1 @@ -18,6 +18,14 @@ If ( $VisionURL ) { $APP_NAME = "Internet Explorer (x86)" } + ## Remove desktop shortcut + $SHORTCUT_PATH = "${Env:Public}\Desktop\Deltek Vision.lnk" + If ( Test-Path $SHORTCUT_PATH ) { + LogMsg "Deleting ""$SHORTCUT_PATH""" + Try { Remove-Item $SHORTCUT_PATH -Force } + Catch { LogErr $_.Exception.Message } + } + ## Create the shortcut If ( $BROWSER_PATH ) { LogMsg "Installing Deltek Vision using ${APP_NAME}" diff --git a/Remove-DeltekVision.ps1 b/Remove-DeltekVision.ps1 index 3117aed..c042949 100644 --- a/Remove-DeltekVision.ps1 +++ b/Remove-DeltekVision.ps1 @@ -9,12 +9,4 @@ If ( Test-Path $APP_PATH ) { Try { Remove-Item $APP_PATH -Recurse -Force } Catch { LogErr $_.Exception.Message } -} - -## Remove desktop shortcut -$SHORTCUT_PATH = "${Env:Public}\Desktop\Deltek Vision.lnk" -If ( Test-Path $SHORTCUT_PATH ) { - LogMsg "Deleting ""$SHORTCUT_PATH""" - Try { Remove-Item $SHORTCUT_PATH -Force } - Catch { LogErr $_.Exception.Message } } \ No newline at end of file