Search For An Installed .EXE and Error Message - 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!

WISE2MSI
Posts: 11
Joined: Mon Mar 17, 2008 4:43 pm

Search For An Installed .EXE and Error Message

Hello,

Im trying to do a search for a .exe file on the target machine which I need to run before my app installs. If the search fails, I would like it to stop the installation (immediately) with an appropriate error message. If the search works I would like the install just to continue.

I've setup a search with a depth of 10 (which works ok), but am unsure how to utilise this in Custom Actions / Install. I've tried various permutations, including the Wizard but none appear to work satisfactorily.

Can anyone assist?

Many thanks in advance.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Search For An Installed .EXE and Error Message

Hi,
Im trying to do a search for a .exe file on the target machine which I need to run before my app installs.
This can be done by using a "Launch file or open URL" custom action. In order to launch the file before the installation starts you can schedule the custom action under the "InstallUISequence" -> "CostFinalize" standard action. Note that you can see a standard action by using the "Show Standard Action" button on the toolbar of the Custom Actions page.

After you add the custom action, all you need to do is to set the "Command Line" field to the property of the search you are using. For example, if the property is named MY_SEARCH, then the command line should look like this:

Code: Select all

"[MY_SEARCH]"
If the search fails, I would like it to stop the installation
This can be done by using a custom launch condition. For example, if the search is named MY_SEARCH, the custom launch condition can look like this:

Code: Select all

MY_SEARCH         The file was not found, therefore the installation will stop.
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
WISE2MSI
Posts: 11
Joined: Mon Mar 17, 2008 4:43 pm

Re: Search For An Installed .EXE and Error Message

Many thanks, this worked.

Return to “Common Problems”