We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

chphipps

Custom action

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.
chphipps

Above...

I forgot to mention that this needs to happen at the very end of the installation.
UdreaMihai
Posts: 90
Joined: Wed Mar 23, 2005 8:13 am

Hi,

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 " ).

Hope it helps.

Regards,
Mihai.
Udrea Mihai
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”