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 and Java 1.3.1 install


4 replies to this topic

dalkema

dalkema
  • Full Members
  • 9 posts

Posted 10 May 2002 - 22:04

I have an IS 6.31 install that runs the Sun Java 1.3.1 install silently.  I broke out the install package from Sun and modified the Setup.iss to suit my purposes.  The problem is when I call LaunchAppAndWait with either WAIT or NOWAIT,  the java setup.exe seems to "hang" on Win2k (and maybe others).  I can see the process in Task Manager, but cpu is 0.

I think the code is standard:

sCmd = TARGETDIR ^ @JRE_DIR ^ "Setup.exe";

nRet  = LongPathToShortPath(sCmd);  // for long file names
sCmdLine = "/s";  
nRet = LaunchAppAndWait(sCmd, sCmdLine, NOWAIT);

I use delays and GetProfileString on setup.log to determine when the install is finished.

TIA,
David

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 11 May 2002 - 00:26

Never messed with running the JDK/JRE from IS, but sounds like you're on the right track.  Have you confirmed that silently launching it outside of IS with your modified ISS works as expected?

For some reason, Perotin suggests uses "/s /a /s" in the following post.  Not sure why the double /s.  Maybe it's a typo.

In any case, you could also try calling DoInstall instead.
user posted image

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 13 May 2002 - 08:35

TacoBell00: java 1.3.1 install can't be launched with DoInstall since this will only work for install written in IS 6.x
The java 1.3.1 installer is written in IS 5.1

dalkema: Not completely sure, but you might be violating the license agreement by tampering with the install. Check with SUN to be sure.

dalkema

dalkema
  • Full Members
  • 9 posts

Posted 14 May 2002 - 15:22

The problem seems to be that after the primary app calls LaunchAppAndWait, it goes into a loop checking the output setup log.  The loop contains Delay() calls.  Apparently the Delay() function is making both scripts sleep.  I don't understand this because I am using 6.31 and the Java install is done in 5.X (I think 5.1).

Workaround:  Add a batch file to the install for winnt that calls cmd.exe /c setup.exe /s.  Then call LaunchAppAndWait on the batch file.  This works, but I get all of the ugly DOS popup windows.  I tried the LaunchAppEx code from this site, but for some reason I still get the "hang".  Any ideas?

Note:  Tacobell mentioned the /s /a /s call.  That is for a single .exe install.  the first /s is for the "wrapper" exe.  The /a passes the rest of the command line to the packaged setup.exe.  I couldn't use this because I had to expand the JRE install and change the location in setup.iss.

Thanks for all the help.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 14 May 2002 - 15:55

dalkema: Ohh yeah, that makes sense that one would need the additional command line arguments in the case of a single executable.  Guess I had a brain fart at the time.
user posted image