update
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user