This commit is contained in:
2020-08-14 14:19:37 -04:00
parent d18f8dad97
commit f2b358d8dd
24 changed files with 253 additions and 180 deletions
+7 -4
View File
@@ -1,11 +1,14 @@
param(
[string]$VisionURL
[string]$VisionURL='https://dbia.deltekfirst.com/DBIAClient/DeltekVision.application'
)
## Installation location for shortcut
$InstallLocation = "${Env:Public}\Desktop\Deltek Vision.lnk"
## Remove the existing shortcut
If ( Test-Path "${Env:UserProfile}\Desktop\Deltek Vision.lnk" )
If ( Test-Path $InstallLocation )
{
Try { Remove-Item -Path "${Env:UserProfile}\Desktop\Deltek Vision.lnk" -Force }
Try { Remove-Item -Path $InstallLocation -Force }
Catch { Write-Output $_.Exception.Message }
}
@@ -21,7 +24,7 @@ If ( $VisionURL )
Try
{
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("${Env:UserProfile}\Desktop\Deltek Vision.lnk")
$Shortcut = $WshShell.CreateShortcut($InstallLocation)
$Shortcut.Arguments = $VisionURL
$Shortcut.Description = "Launch Deltek Vision"
$Shortcut.IconLocation = "${IEPATH}, 0"