Powershell Detection Method Uninstaller

11:28 am Uncategorized

There is no detection method logic to check that a file doesn’t exist for a required Application.

You have two options to accomplish this:
1. You run a script that creates a file after the uninstall if complete. Then use the file as a detection method.
2. Run a Powershell script that checks that the file is missing and return $true.

Option #2:


if (-Not (Test-Path "c:\Program Files (x86)\Program\Program.exe") -and -Not (Test-Path "c:\Program Files\Program\Program.exe")) { $true }

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.