Custom Actions: EXE with Working Dir - 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!

nwadc10
Posts: 4
Joined: Sun Jul 12, 2009 5:50 pm

Custom Actions: EXE with Working Dir

I have written a small exe to be run as a custom action during install. However, when testing the installer I keep getting the following error:

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.

I know the exe runs fine because I can run it by itself and it works properly. I placed some error checking in the exe and found that during the installation the exe was being run from a windows directory instead of the applications install directory which is where the exe is installed to. Finally I found the custom actions: exe with working dir.

I have a strong suspicion that the problem is caused by syntax in the Full Path option in the Custom Action Properties. Currently I have tried [APPDIR]\MFC.exe and several forms of that with no luck. What is the proper syntax I need for a program called MFC.exe that is located the applications install directory?

Thanks,
Justin
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom Actions: EXE with Working Dir

Hi,

You could try using:

Code: Select all

 "[APPDIR]MFC.exe"
This should solve the problem. However, if the problem still persists, please send us the .aip file of your project and a verbose log file to support at advancedinstaller dot com so we can investigate it.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nwadc10
Posts: 4
Joined: Sun Jul 12, 2009 5:50 pm

Re: Custom Actions: EXE with Working Dir

Hi Bogdan,

Thanks for your reply, however I found the problem and wasn't able to post a note here before your reply. After more searching I found an unrelated issue with a solution that referenced InstallFinalize and placing the CA there. I did that and used the Formatted Text reference to the file [#MFC.exe] in the Full Path field and now all works well. It looks like the CA was trying to run the program before it was actually installed.

Regards,
Justin

Return to “Common Problems”