run exe before installation? - Advanced Installer Community

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!

wbfreek
Posts: 3
Joined: Tue Oct 07, 2008 11:38 am

run exe before installation?

Hi. We’re trying to install run an .exe during the installation process. However, the exe requires multiple files in order to execute, and the source path for an executable in a custom action only allows absolute paths. How can I get an executable to run that’s on a disc? For example. . .

Folder1
-----> Program1.exe
Folder2
----> Program2.exe
Setup.exe

How can I tell the installer to run Program1.exe?

Thanks!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: run exe before installation?

Hi,

When using the EXE bootstrapper you can use the SETUPEXEDIR property to get the path of the folder which contains the installation file. Therefore, the path of "Program1.exe" can be specified like this:

Code: Select all

"[SETUPEXEDIR]Folder1\Program1.exe"
In order to launch "Program1.exe" you can use a "Launch file or open URL" custom action which uses the above command line (including the quotes). Please note that if you don't have an EXE bootstrapper you can use SourceDir instead of SETUPEXEDIR.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
wbfreek
Posts: 3
Joined: Tue Oct 07, 2008 11:38 am

Re: run exe before installation?

Cool, that worked. Now my only problem is this: when I try to uninstall the package, it tries to look for the executable that was run from the disc. I put my custom action in "InstallFinalize." Why is the unistaller looking for the executable?
wbfreek
Posts: 3
Joined: Tue Oct 07, 2008 11:38 am

Re: run exe before installation?

ah, nevermind. I figured it out. Just needed to put it in the "Install" part of the sequence instead. Problem solved!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: run exe before installation?

Hi,

Please note that a custom action which runs only during the first installation should use the condition "Not Installed". This condition is set automatically if the custom action is added under the "Install" standard action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”