View Full Version : Delayed Custom Action

07-29-2002, 03:04 PM
I have created an install with several custom actions. The launches an exe installed with the application. This exe kicks off and loads a setup form that the user has to fill out. When it is done I want it to return back to the installer. At that point the installer should kick off the next action.

So far I have been unable to do this. Any ideas would be appreciated


07-30-2002, 09:45 AM
Can you be more specific to where it is failing?

Is this a standard or basic install?

Why not include the data entry in the UI sequence and then have the processing done in a custom action?

07-30-2002, 10:44 AM
it is a basic msi

what happens is that the installer copies all the files into the target directories. It should then kick off the first .exe called by the first CA. This should then run outside the installer.

Once that window is closed the next custom action should be called. However, this is not the case, they are both being called at the sametime so the first CA which has to finish first is not getting a chance to run to completion.



07-30-2002, 10:57 AM
Through the Custom Action Wizard make sure you have selected the checkbox to "Wait for the action to finish executing" and Defered execution.

Or add 128 to the Custom Action Type. Assuming you are using Type 18 the value for the type should be at least 146. You should also be calling it defered so really the number should be +1024 or 1170.

Also, make sure the CA is placed in between the InstallInitialize and InstallFinalize actions in the Execute sequence.

07-30-2002, 11:02 AM
I am having a similar problem, except that I can't get my CA to run at all. At the point that it is trying to launch it, I am getting an error. It says more or less that it can't run the program. Then I get a fatal error. At this point, my whole install stops. I am running it deferred, but unsure as to where exactly I need to insert it into the sequence. It definately needs to wait and run after the files are installed, and after the merge modules are ran. Any suggestions?

07-30-2002, 11:06 AM

Please supply the error.
Make sure you have a qualified path in the CA, i.e., [INSTALLDIR]myexe.exe.

I mention the location the sequence in a previous post in this thread.

07-30-2002, 11:23 AM
Ok, here is the error:

Error 1722. There is a problem with this windows installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

The next error says:

Error: -1603 Fatal Error during installation.

Consult Windows installer help (msi.chm) or MSDN for more information.

I do have the target setup right I think. I have my install directory called FAST, then another folder in it called App Files. My target is set up as follows:

[INSTALLDIR]App Files\setup.exe

07-30-2002, 11:31 AM
I looked at the MSI help and 1722 states:

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action [2], location: [3], command: [4]

Is the application exiting properly? Look at Task Manager during execution.

Have you produced a log file and examined it's contents around the error?

msiexec /i your.msi /l*v log.txt

Have you tried it in Commit as opposed to deferred mode?
And definitely run it with "Wait for the action to finish executing".

Hope this helps.

07-30-2002, 02:11 PM
Well, I tried all that, and it still didn't work. In trying to produce the log file, I get another error that says:

1: This Installation cannot be run by directly launching the MSI package. You must run setup.exe.

07-30-2002, 02:15 PM
make sure that your CA is right above the installfinalize event. I was running into that same issue if i tried to put my actions anywhere else....

07-30-2002, 02:21 PM

Try running:

setup.exe /v"/l*v log.txt"

to obtain a log.

07-30-2002, 02:35 PM
Tried running it there too, still get the same error.

07-30-2002, 02:38 PM
I am getting another error from running that one, Cannot find the file, however, I have the directory open and am looking at it while I am typing it.

07-31-2002, 11:21 AM
I can now get it to run both CA at the sametime. What I mean is that it kicks off the first action and moves forward with that. It then also kicks off the second action at the same time. I really need them to be sequential. That is the first action should run, finish and the window should close before the next CA starts.

They are both set as Deferred action and are set to wait. I am not sure what else I should do.

any ideas??

07-31-2002, 01:50 PM
I wish I could help man, but I haven't even gotten one to work yet, I'll let you know if I do though, because similar to you, I have 3 that I need to run.

07-31-2002, 02:17 PM

What are your type numbers for these actions?

Are the sequence numbers different?

Have you generated a log file?

07-31-2002, 02:19 PM
A quick fix: Use a single custom action of type InstallScript or VBScript to launch your exe's in sequence.

In InstallScript, use LaunchAppAndWait to run your exes, in VBScript, use the WScript::Run method to launch and wait for your exe's to finish.

This isn't the best approach, since there's no reason you should have to do this. But it should work.

07-31-2002, 02:20 PM
the first is 3137 the second is 3143

the types are both 1042

I have not create a log fo this install

07-31-2002, 02:39 PM
So, if your Type is 1042.
Are you using a base CA type of 18?

If so, then to defer it is +1024 = 1042

This means you are not waiting for it to complete!

Please try type 1170.

You need to add 128 for the wait.

07-31-2002, 02:42 PM
Thanks! I will give that a shot.

07-31-2002, 03:52 PM
that didn't work. I changed them both over to 1170 but they still both run at the same time. Anything else??