I am trying to launch an exe as a custom action. I need to have an environment variable defined based on the lcoation of the install before this happens. I can't figure out how to do this. Can someone lend some help? Thanks in advance.
To sequence a custom action at the very end of the installation you must place it under "InstallFinalize" - if "InstallFinalize" is not
present in the Install Sequence use the "Show Standard Action">"Before Finalization">"InstallFinalize" menu item to add it.
You may find it useful to use the Execution Condition Expression: NOT Installed.
But, you can't set/modify an Environment Variable during the installation and use it in a custom action even if the custom action is scheduled after the environment variable has been registered. This is a Windows Installer limitation.
The proper way to pass the TARGETDIR to the EXE file is by using a command line.
For the Command Line use exactly the text: "[TARGETDIR] " .(including the space between the ] and " ).
FOLLOW US
Get the latest news in Application Packaging