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!

markmahle
Posts: 5
Joined: Tue Sep 23, 2014 5:35 pm

Custom action to run installed exe not working

I made a very simple enterprise application that installs two exes. One of them is a driver installer which I want to launch when my install is done so I made a custom action launch installed file and put it after the finish execution steps but it keeps failing with the message "There is a problem with the windows installer package. A program required for this install could not be run." The log for it says the program doesn't exist but it does exist so I am not sure what the issue is. Attached is a screenshot showing the files already installed at time of this error. Also I attached my project file. It won't let me attach the msi for some reason.

Error log says

Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: CDM21214_Setup.exe, location: C:\Program Files\Your Company\Your Application\CDM21214_Setup.exe, command:
=== Logging stopped: 5/2/2017 12:45:05 ===


Thanks for any help.
Attachments
Your Application.aip
(11.74 KiB) Downloaded 299 times
files installed already.png
files installed already.png (107.12 KiB) Viewed 4567 times
error install.png
error install.png (48.46 KiB) Viewed 4567 times
markmahle
Posts: 5
Joined: Tue Sep 23, 2014 5:35 pm

Re: Custom action to run installed exe not working

I figured out how to add this exe as a prerequisite application which was much easier. I am still interested to know why this is failing as a custom action though.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom action to run installed exe not working

Hello,

Please note that the recommended method for installing another setup is trough "Prerequisites" feature indeed. Windows Installer doesn't permit running two installations at the same time, thus sometimes, depending on the exact scenario custom actions installs can fail.

The custom action error can be encountered when the related EXE requires elevation at launch time. In this case the custom action needs to be configured to run as deferred. You also need to set "Run under the LocalSystem account with full privileges (no impersonation)" execution option for it.

Also, when an application launched by a custom action exits with a code different than 0, then Windows Installer will interpret this as a failure. To skip this check you can uncheck "Fail installation if custom action returns an error" execution option. This flag is useful for custom actions which returns a different value than 0 on success.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”