Files
management-scripts/Install-DeltekVision.ps1
T

24 lines
1.1 KiB
PowerShell

If ( $VisionURL ) {
## Get the path to a compatible browser
If ( Test-Path "${Env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe" ) {
$BROWSER_PATH = "${Env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe"
}
ElseIf ( Test-Path "${Env:ProgramFiles}\Microsoft\Edge\Application\msedge.exe" ) {
$BROWSER_PATH = "${Env:ProgramFiles}\Microsoft\Edge\Application\msedge.exe"
}
ElseIf ( Test-Path "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe" ) {
$BROWSER_PATH = "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe"
}
ElseIf ( Test-Path "${Env:ProgramFiles}\Internet Explorer\iexplore.exe" ) {
$BROWSER_PATH = "${Env:ProgramFiles}\Internet Explorer\iexplore.exe"
}
## Create the shortcut
If ( $BROWSER_PATH ) {
Create-Shortcut -Path "${Env:Public}\Desktop\Deltek Vision.lnk" -TargetPath $BROWSER_PATH -Arguments $VisionURL -Description "Launch Deltek Vision"
}
Else { LogMsg "A compatible browser could not be found: ${BROWSER_PATH}" }
}
Else { LogMsg "No URL to Deltek Vision was specified!" }