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

_LaunchAppEx() problem w/ ISDev Std projects.


8 replies to this topic

colby

colby
  • Full Members
  • 37 posts

Posted 25 October 2002 - 20:35

Thought I'd pass this along as I just lost two days trying to figure it out.  Basically, I moved my call to _LaunchAppEx  to the OnFirstUIAfter event and it stopped working.

Evidently, you can't call the procedure from the OnFirstUIAfter() event in an IS Dev standard project when the application you are launching is an self-extracting executable that launches another installation (as in a Package For The Web [PFTW] file like the Adobe Acrobat Reader installer or the Sun Java 2 Runtime Environment installer).

If you do, the PFTW file is launched and extracts just fine but when it launches the "child" installation, the child installation GUI is NOT visible no matter what was specified in the nShow parameter.  If you specified WAIT for the nWait parameter, the parent install will stop (as expected) and you must open Windows Task Manager and kill the PFTW process before the parent install will continue.  As soon as you kill the PFTW process, the parent install continues AND the PFTW child install GUI starts!

If the exact same code is launched from an "MyFeature_Installing()" event, it works fine (the child installation GUI is displayed normally).

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 October 2002 - 21:24

Does the child run without any GUI, or is it hidden behind the parent setup?

colby

colby
  • Full Members
  • 37 posts

Posted 28 October 2002 - 17:31

The two examples I gave (Adobe Acrobat "rp505enu.exe" and Sun Java 2 Runtime "j2re-1_3_0_04-win.exe") both extract and then launch a GUI.

They work fine if called from any "???_Installing()" event but don't work if called from OnBegin() or OnFirstUIAfter().  That is, the PFTW executable launches fine in all three events but in the latter two events the installation GUI does not launch until the PFTW executable running process has been killed using Windows Task Manager.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 04 November 2002 - 17:38

I think I remeber a similar problem reported in community.installshield.com. This might be some sort of incompatibility with PFTW.

colby

colby
  • Full Members
  • 37 posts

Posted 21 November 2002 - 20:30

The solution is to specify the "-SMS" command line argument.

:)

wernerf

wernerf
  • Members
  • 22 posts

Posted 22 November 2002 - 11:14

Sorry for the silly question: WHERE must "-SMS" be added? To the commandline passed to _LaunchAppEx()?

tetris

tetris
  • Members
  • 2 posts

Posted 01 December 2002 - 10:41

Hi,

I have a problem with this function as well. only that my problem is that the executable i am trying to launch doesn't get launched at all... i had upgraded from ISDEV 7 to 8 and had to accept the changes in the definition of CreateProcessA, as it was defined in winapi.h that came with ISDEV 8. it seems that no matter how i pass the arguments to this function, the path to the executable gets an extra space character, either on the beginning or the end of the path, and this cuases the failure. i am sure the path is correct, and when i pass it to the function it has no extra space characters, but somewhere it is added...
can anyone help me overcome this issue - all i want is to hide the window during the execution of the exe and this function is the best i found so far.
10x in advance

tetris

tetris
  • Members
  • 2 posts

Posted 01 December 2002 - 12:48

Hi again,

it seems that i had to pass to CreateProcessA the parameter for lpCurrentDirectory. when i do so, the executable runs with no problem. when the parameter was empty string ("") the call for CreateProcessA failed.

lonny

lonny
  • Members
  • 14 posts

Posted 03 December 2002 - 10:58

Is just upgraded to Dev 8.0 an encountered the same problems with _LaunchAppEx().

Adding the 'name space' kernel32. to the dll function calls in
_LaunchAppEx() solved the problem...

e.g.
prototype BOOL kernel32.CreateProcessA(POINTER, ...

kernel32.CreateProcessA(NULL, "My Program.exe", ...

lonny