update
This commit is contained in:
+2
-11
@@ -4,17 +4,8 @@ $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 )
|
||||
{
|
||||
## Stop the process if it's currently running
|
||||
Try
|
||||
{
|
||||
$Process = Get-Process -Name "DeltekVision" -ErrorAction SilentlyContinue
|
||||
If ( !($Process -eq $null) ) { Stop-Process -Name $ProcessName -Force }
|
||||
}
|
||||
Catch { Write-Output "Deltek Vision is running but couldn't be stopped!"; Exit }
|
||||
|
||||
## Delete the existing installed app
|
||||
Try { Remove-Item $APP_PATH -Recurse -Force }
|
||||
Catch { Write-Output "There was a problem while deleting the installed version of Deltek Vision!"; Exit }
|
||||
Catch { Write-Output $_.Exception.Message }
|
||||
|
||||
Write-Output "Deltek Vision was successfully uninstalled."
|
||||
}
|
||||
} Else { Write-Output "${APP_PATH} does not exist!" }
|
||||
|
||||
Reference in New Issue
Block a user