How to run Support Files from same directory


I am trying to get PSADT to uninstall an older version of an app before installing the new one. I have the file configured correctly to do this on a local test VM. But this app has to be deployed through SCCM, so the “Pre-Installation” part of the config file needs to have the current directory path to uninstall the old version.

I tried using “.\Support Files\example.msi” but this gives an error.

How can I setup the config file to run the Pre-Installation part from the current directory?

I’m very new to this tool and PowerShell. I appreciate all advice given.

Thank you.

@Ian use “$dirSupportFiles\example.msi” instead.

1 Like

That worked! It was probably in the guide somewhere, but I’m so new to the tool and PS that I didn’t catch that.

Thanks a lot for the quick helpful reply!