remove unnecessary code from Install-DeltekVision.ps1

comment out Create-Shortcut from Install-Wireguard.ps1
fix some log messages in Tools.ps1
This commit is contained in:
2020-12-03 20:18:23 -05:00
parent f6bf0e18e9
commit 4b84f79083
3 changed files with 14 additions and 34 deletions
+9 -30
View File
@@ -1,35 +1,14 @@
## Installation location for shortcut
$InstallLocation = "${Env:Public}\Desktop\Deltek Vision.lnk"
## Remove the existing shortcut
If ( Test-Path $InstallLocation )
{
LogMsg "Deleting ""${InstallLocation}"""
Try { Remove-Item -Path $InstallLocation -Force }
Catch { LogErr $_.Exception.Message }
}
. 'C:\Users\dyoder\Emberkom\Data\Projects\development\management-scripts\Tools.ps1'
$VisionURL = 'https://dbia.deltekfirst.com/DBIAClient/DeltekVision.application'
## Get the correct path to IE
If ( Test-Path "${Env:ProgramFiles(x86)}" ) { $IEPATH = "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe" }
Else { $IEPATH = "${Env:ProgramFiles(x86)}\Internet Explorer\iexplore.exe" }
If ( $VisionURL )
{
If ( $VisionURL ) {
## Make sure IE exists where we expect it to
If ( Test-Path $IEPATH )
{
LogMsg "Creating shortcut at ""${InstallLocation}"""
Try
{
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($InstallLocation)
$Shortcut.Arguments = $VisionURL
$Shortcut.Description = "Launch Deltek Vision"
$Shortcut.IconLocation = "${IEPATH}, 0"
$Shortcut.WorkingDirectory = "$(Split-Path -Path $IEPATH -Parent)"
$Shortcut.TargetPath = "${IEPATH}"
$Shortcut.Save()
}
Catch { LogErr $_.Exception.Message }
} Else { LogMsg "Internet Explorer could not be found: ${IEPATH}" }
} Else { LogMsg "No URL to Deltek Vision was specified!" }
If ( Test-Path $IEPATH ) {
Create-Shortcut -Path "${Env:Public}\Desktop\Deltek Vision.lnk" -TargetPath $IEPATH -Arguments $VisionURL -Description "Launch Deltek Vision"
}
Else { LogMsg "Internet Explorer could not be found: ${IEPATH}" }
}
Else { LogMsg "No URL to Deltek Vision was specified!" }