PDA

View Full Version : Executable command CA error handling



marc.gibian
08-22-2005, 03:31 PM
My setup needs to execute one of the files it is installing to complete the install process. I have created a Customer Action of type "Launch an executable" and configured it to run my executable with all of the necessary command line arguments. I have configured it to be "After MsiPublishAssemblies" in the Install Execute Sequence. I haven't found a place in the Install UI Sequence that makes sense (to me) since this needs to be executed after the executable has been placed somewhere that it can be found when its time to launch it, though this could be an issue.

Everything I test my install, I get a "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 suppolrt personnel or package vendor." error.

The more I research this issue, the more it seems that the program is never actually executed?

How do I debug this issue? What precisely is causing my 1721 error? What am I missing in my specification of this executable to allow it to be run?

It will not be unusual for this executable to return errors. This program requires a variety of security settings within the webserver and SQL Server database to be "just right" for it to work. Thus, I need to be able to display these errors to the user so they can identify any mistakes thay have made in the security configuration (most of these are not things that should be addressed by the setup itself) and then retry. I do not see how I accomplish this with my current custom action configuration? (by the way, the executable must reference a number of data files... right now I have all of these setup as the files being installed by this setup).

Thanks as always for your prompt assistance.

-Marc

TonyLowrey
08-23-2005, 06:00 AM
I too have similar problems when I use any .exe option apart from the 'stored in binary' option. It looks like the executable is not being found via the directory, property or installed file location. When I use the help file example notepad.exe it always works but when I rename notepad.exe to note.exe and locate the note.exe in all the locations that it may be using it always reports the error! It never gets to run the program so the arguments are irrelevant.

TonyLowrey
08-23-2005, 06:07 AM
I fixed it. Another example of poor documentation ;-(
The two settings are Working Directory and File Name, however the file name is not located in the wroking directory. The filename field has to be the full path and filename e.g. [INSTALLDIR]action.exe args
I have wasted a day on this but answering your post triggered the solution! Thanks.

marc.gibian
08-23-2005, 01:17 PM
First, glad to hear you've got things working.

Late yesterday I found some obscure posting that indicated a custom action executable that runs a file that is part of the install can run no sooner than Install Publish (I think that's it). That seems awfully late in the install order, but I shifted to that position in the execution sequence and my program suddenly started executing.

The larger problem I need to deal with is the fact that this executable may encounter problems and I need to present those error messages to the user as they will require user actions to resolve. Right now the executable is writing to output, so a command window is openning while it runs, but that disappears as soon as execution is complete and the install process completes independent of the success or failure of the executable.

How do I provide for display of errors to the user?

How do I eliminate the transient command window?

How do I give the user the opportunity to choose to retry execution of the executable, presumably after they have addressed, external to the install, the problems reported to them?

I am quite pleased that I have the setup built thus far, almost functionally complete, without a single line of scripting. I would not be surprised if I need to use some InstallScript to accomplish these remaining tasks, though would be happier if it could be done without scripting.