Can the toolkit detect if a file exists before running and abort if found?

The application I’m setting up to deploy is already installed on a lot of our computers, but needs to be on all computers. I would rather the script not run the installation phase if the app is already installed, and I can determine it’s installed if a certain file exists. Can I make the Toolkit look for the file and abort the installation if found? Is there another way of achieving the results I’m looking for?

Sure, Just put in an if statement near the beginning of your script, in the pre-installation section.

Something like:

If (Test-Path -Path <>) {

Exit-Script -ExitCode 0
}

1 Like

Oh right on! Perfect! Thanks.