PDA

View Full Version : LaunchAppAndWait is failing



aburajib
07-26-2002, 04:02 PM
None of my LaunchAppAndWait functions to launch third-party programs are working now in WinNT40 and Win2000; they ran well in Win9x. For example, I have a checkbox for the user to install Adobe Acrobar Reader. In my install script, I added -

function InstallAdobeAcrobat()
STRING szAcroLoc;
begin
szAcroLoc = SRCDIR ^ "\\AdobeAcrobatReader\\ar505enu.exe";

if(LaunchAppAndWait(szAcroLoc, "", WAIT) < 0) then
MessageBox("Adobe Acrobat Reader installation failed", SEVERE);
endif;
end;

The SRCDIR is a network location and I confirmed that the exe file is there. This isn't working now. What went wrong? Any clue?

Prince
07-27-2002, 04:22 AM
Just debug your project and then check the path in szAcroLoc variable.

aburajib
07-29-2002, 01:13 PM
The path is 100% correct and its a network path.

aburajib
07-29-2002, 01:43 PM
We are installing our software from netowork. I am in Novel Netware. I do have administrative privilage to network, to my WinNT40 and Win2000 machine. I am logged in to my machine and Nevel as administrator privilage. None of my LaunchAppAndWait, FindFile, [X]CopyFile is working! Is this because of network installtion. Can't I do it? I am using InstallShield 7.03 (with Service Pack 3) and my installation is a standard project.

mojo_head
07-29-2002, 02:05 PM
KB article Q101113 states that the LauchAppAndWait call relies on resolving/monitoring the window handle of the spawned app (which it acquires through capturing the spawned apps window caption. ).

As it is, my solutions have been varied:

In one case I was calling setup.exe for MSDE2k, but it was returning immediately and trying to run subsequent MSDE-dependent installscript code (failing miserably of course). I solved it calling msiexec against its MSI file(s) instead: the spawned app caption never changed and everybody was happy.

In another case, I built a 'wrapper' setup for a product which controlled the secondary (spawned) app instance, leaving me monitoring the "wrappers" window. In a variation, I built a tiny Win32 dll (with installshields' required exports) and managed the secondary process myself.

In yet another case, I created a merge module for the app - 'nuff said.

Hope this helps...