Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

LaunchAppAndWait problem


5 replies to this topic

vidyak

vidyak
  • Members
  • 5 posts

Posted 18 February 2004 - 22:36

I am using steps from MS knowledge base # 313301 to install ActiveSync on client m/cs.

HOW TO: Use Silent Mode Setup to Deploy ActiveSync

My problem is when I launch setup.exe from my script with reqd parameters using LaunchAppAndWait, my setup doesn't wait for activesync setup to finish. Control comes back to my script after a few seconds but I can still see ActiveSync setup copying files. Has anybody seen this behavior before?? There are few more LaunchAppAndWait calls elsewhere in my setup which seem to be working fine.

Thanks in advance.

Xitch13

Xitch13
  • Members
  • 134 posts

Posted 19 February 2004 - 16:31

This is from the commetns section of the LaunchAppAndWait function on IS's help:
"
Setup cannot monitor an application that does not create a window. If the specified application does not create a window, the setup will continue immediately after launching the application. Note that the window for the application need not be visible, but it must exist in order for the setup to wait.
"


If you're trying to install it silently, it is probably not creating a window for IS to check, and that's probably the reason it continues on.

You may want to use the _LaunchAppEx function from the LaunchAppEx.rul available on this site. That way you could launch the second install and hide its window. (search for it under LaunchAppEx.zip in Extensions for InstallShield Pro: External Programs and Shell)

There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)

vidyak

vidyak
  • Members
  • 5 posts

Posted 19 February 2004 - 20:12

Thanks for the pointer.
Maybe I am missing something here but isn't LaunchAppAndWait supposed to have changed between ver IS Pro 6.x and ver 7.0?

I went thru the _LaunchAppEx fn you have mentioned but comaptibility section there says

QUOTE
InstallShield Professional 7: this version has a new implementation of the LaunchAppAndWait function that is quite similar to LaunchAppEx, so this package is obsolete if you're using Professional version 7


Even IS Professional 7.x help says that LaunchAppAndWait is supposed to monitor process handle instead of just window.

QUOTE
LaunchAppAndWait uses the Windows API function CreateProcess to launch the specified application. After the application is launched, if the LAAW_OPTION_WAIT option is specified, the setup monitors the launched process's process handle; once the process has completed the setup continues.


If it helps, ActiveSync setup seems to be written using old version of IsPro (5.x o prior) and this is what I found on IS support site

Launching an InstallShield 5 Setup

I have tried this as well without any success.

Any help will be greatly appreciated!!

Xitch13

Xitch13
  • Members
  • 134 posts

Posted 19 February 2004 - 21:12

hmmmm, well I was going to suggest using DoInstall() but that is only for setups using IS 6 or later. And since using the /sms command line switch isn't working for you either...would just using a Delay work for you? I know it's a hack, but it may solve your problem for now.

Actually scratch that. That's a real ugly hack. Try to the DoInstall with a a WAIT and see if that works for you, then try a hack.

I'll keep looking on this end for another solution


Good luck
There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)

BrianF

BrianF
  • Members
  • 6 posts

Posted 05 March 2004 - 18:31

Not sure if this is related but LaunchAppAndWait() has a possible bug in it that burned me really bad. mad.gif In IS7, when using LaunchAppAndWait more than once and specifying hidden on the 1st one, it continues to hide all other apps unless setting something like LAAW_OPTION_MAXIMIZED to reset the LAAW function.

So my command windows were hidden but my ie browser window was also hidden even though I did not say to hide them. This crashes the OS.

Maybe this is a similar issue? Try adding LAAW_OPTION_WAIT for kicks.

Hope this helps!
Brian-

Edited by BrianF, 05 March 2004 - 18:32.


vidyak

vidyak
  • Members
  • 5 posts

Posted 11 March 2004 - 16:24

Thanks you all for your help.

I have sort of solved the problem. It seems ActiveSync setup I am trying to launch creates a log file with string FINISHED to mark end of install. So as I crude solution, my install keeps polling this file looking for either 'FINISHED' or 'ERROR' to get control back.

Don't know if this is right way to handle the situation but I found this info from Microsoft documentation.