remove shortcut too

This commit is contained in:
2021-10-25 11:39:05 -04:00
parent 9444fef8b0
commit 2cdd22d67c
+10 -5
View File
@@ -1,15 +1,20 @@
## Stop the DeltekVision process
End-Process -Name "DeltekVision" -Force
## Set the path to Deltek Vision
$APP_PATH = "${Env:UserProfile}\AppData\Local\Apps\2.0"
## Test to make sure it's installed for the current user before continuing
If ( Test-Path $APP_PATH )
{
$APP_PATH = "${Env:UserProfile}\AppData\Local\Apps\2.0"
If ( Test-Path $APP_PATH ) {
## Delete the existing installed app
LogMsg "Deleting ""${APP_PATH}"""
Try { Remove-Item $APP_PATH -Recurse -Force }
Catch { LogErr $_.Exception.Message }
}
## Remove desktop shortcut
$SHORTCUT_PATH = "${Env:Public}\Desktop\Deltek Vision.lnk"
If ( Test-Path $SHORTCUT_PATH ) {
LogMsg "Deleting ""$SHORTCUT_PATH"""
Try { Remove-Item $SHORTCUT_PATH -Force }
Catch { LogErr $_.Exception.Message }
}