Sometimes in an InstallShield installation, it is useful to know the path to Setup.exe. Here’s how you can do that.
In a Basic MSI or InstallScript MSI project, SETUPEXEDIR is the property that contains the path to Setup.exe
For example, if the path to Setup.exe is C:\Test\Setup.exe, the value of SETUPEXEDIR is C:\Test\Setup.exe.
To use SETUPEXEDIR, you need to know a couple of limitations:
- SETUPEXEDIR is set by Setup.exe. If the end user runs the MSI package directly, SETUPEXEDIR is not set.
- SETUPEXEDIR might not be set during an uninstallation. If the user triggers an uninstallation by running Setup.exe, SETUPEXEDIR is set. If he runs the uninstallation from Add/Remove Programs, SETUPEXEDIR is not set.
There you go.