Files
management-scripts/Install-DeltekVision.ps1
T

29 lines
1.3 KiB
PowerShell
Raw Normal View History

If ( $VisionURL ) {
2021-03-11 10:49:11 -05:00
## 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"
2021-06-17 11:19:34 -04:00
$APP_NAME = "Edge (x64)"
2021-03-11 10:49:11 -05:00
}
ElseIf ( Test-Path "${Env:ProgramFiles}\Microsoft\Edge\Application\msedge.exe" ) {
$BROWSER_PATH = "${Env:ProgramFiles}\Microsoft\Edge\Application\msedge.exe"
2021-06-17 11:19:34 -04:00
$APP_NAME = "Edge (x86)"
2021-03-11 10:49:11 -05:00
}
ElseIf ( Test-Path "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe" ) {
$BROWSER_PATH = "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe"
2021-06-17 11:19:34 -04:00
$APP_NAME = "Internet Explorer (x64)"
2021-03-11 10:49:11 -05:00
}
ElseIf ( Test-Path "${Env:ProgramFiles}\Internet Explorer\iexplore.exe" ) {
$BROWSER_PATH = "${Env:ProgramFiles}\Internet Explorer\iexplore.exe"
2021-06-17 11:19:34 -04:00
$APP_NAME = "Internet Explorer (x86)"
2021-03-11 10:49:11 -05:00
}
## Create the shortcut
If ( $BROWSER_PATH ) {
2021-06-17 11:19:34 -04:00
LogMsg "Installing Deltek Vision using ${APP_NAME}"
2021-03-11 10:49:11 -05:00
Create-Shortcut -Path "${Env:Public}\Desktop\Deltek Vision.lnk" -TargetPath $BROWSER_PATH -Arguments $VisionURL -Description "Launch Deltek Vision"
}
2021-03-11 10:49:11 -05:00
Else { LogMsg "A compatible browser could not be found: ${BROWSER_PATH}" }
}
Else { LogMsg "No URL to Deltek Vision was specified!" }