From 2cdd22d67cb540d9dcb8167f1e6a2ab8ed58fb80 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Mon, 25 Oct 2021 11:39:05 -0400 Subject: [PATCH] remove shortcut too --- Remove-DeltekVision.ps1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Remove-DeltekVision.ps1 b/Remove-DeltekVision.ps1 index f5cc1e9..3117aed 100644 --- a/Remove-DeltekVision.ps1 +++ b/Remove-DeltekVision.ps1 @@ -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 } } \ No newline at end of file