Files
management-scripts/Remove-DeltekVision.ps1
T
2020-05-22 14:35:46 -04:00

25 lines
802 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."
}