mike.dumble@sage.com
Posts: 1
Joined: Wed Dec 06, 2017 5:33 am

Launch EXE with working directory fails

I have a custom action "launch EXE with working Directory" where the working directory is TempFolder and the File Path is Setup.exe. Setup.exe and its dependent files and folders have been added to the project as temporary files in the Files and Folders node under the Target Computer | Windows Volume |Temporary node.

During the actual install of the resultant msi file, the temporary files are correctly extracted to the user's temp folder, and if I run double click on the exe through File Explorer, the exe runs as expected. The install, however fails with the message "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: LaunchExeWithDirectory, location: C:\Users\m3d\AppData\Local\Temp\ESP\, command: "Setup.exe"

In reality the location is valid and there is a file called setup.exe in that location. The only launch... option I have been able to get working is Launch Attached File. I need the file I execute to be able to load DLLs located in the folder and read files locate in a sub folder in the same folder as the setup.exe

Any ideas as to what I am doing wrong? At this stage I cannot get even simple exe to run using any launch option other than a attached file. I do not want the exe or associated files to be installed, just used by my setup program.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Launch EXE with working directory fails

Hello and welcome to our forums,

Please note that the correct type of custom action for launching the temporary exe file for your scenario would be "Launch File". Just take a look at this article which describes how to launch a temporary file : How to launch a CMD or BAT file.

The "working directory" field refers to the actual working directory of the executable (not the path to the executable) so in your case it could remain empty.

If this is not helpful, please send us the .AIP (project) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”