cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Pizzamampf
Level 4

LaunchApplication is waiting beyond timeout

Hi,

I got a problem with several LaunchApplication calls in Custom Actions of a BasicMSI project. They all look like this:

 

nCallResult = LaunchApplication("cmd.exe", "/C \"C:\\MyDirectory\\myscript.cmd\"", "C:\\MyDirectory", SW_HIDE, 600000, LAAW_OPTION_WAIT_INCL_CHILD);

 

Now this is the weird part:

As long as the cmd script finishes within the timeout (< 10 minutes in this case), everything works as expected.
If the cmd script takes longer however, the LaunchApplication call will wait indefinitely. In my case, I could see that the cmd script was finished after 13 minutes. The whole installation however was stuck because LaunchApplication would never return.

To me it seems that the timeout somehow "disconnects" the installation from the created process, but doesn't stop the execution of LaunchApplication.

My expectation would be that as soon as the timeout is reached, LaunchApplication would return and my variable nCallResult would contain the corresponding error message.

Am I doing anything wrong?

Labels (1)
0 Kudos
(0) Replies