26 lines
806 B
PowerShell
26 lines
806 B
PowerShell
## 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 ) {
|
|
|
|
## Stop the process if it's currently running
|
|
try {
|
|
$Process = Get-Process -Name "DeltekVision" -ErrorAction SilentlyContinue
|
|
if ( !($Process -eq $null) ) { Stop-Process -Name $ProcessName }
|
|
}
|
|
catch {
|
|
Write-Host "Deltek Vision is running but couldn't be stopped!"; exit
|
|
}
|
|
|
|
## Delete the existing installed app
|
|
try {
|
|
Remove-Item $APP_PATH -Recurse -Force
|
|
}
|
|
catch {
|
|
Write-Host "There was a problem while deleting the installed version of Deltek Vision!"; exit
|
|
}
|
|
|
|
Write-Host "Deltek Vision was successfully uninstalled."
|
|
}
|