remove shortcut too
This commit is contained in:
+10
-5
@@ -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 }
|
||||
}
|
||||
Reference in New Issue
Block a user