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

ExecWizards hanging on exit


2 replies to this topic

mattlove

mattlove
  • Members
  • 1 posts

Posted 12 September 2001 - 07:44

Hi

I've got a problem with ISMP4.01.   I need to run several .bat files from
the installer
to create database tables and such, the problem is that after  batch file
exits, the installer
doesn't proceed until I kill the command window. And sometimes it doesn't
even bother
to run the batch files!!! I'm at wits end here, anybody else had problems
running external batch files? by the way the batch file only has to run a java program, that program works fine and exits correctly.


robsahm

robsahm
  • Members
  • 15 posts

Posted 20 December 2001 - 07:08

You are calling a .bat file which by definition runs in a console.  Control will not return to ISMP until after the console closes.  There is some .bat command that does this, I forget what it is.  Alternately you can just make a custom bean and use the java Runtime class to launch your stuff.  This way you have control over wether you need to wait for the process to finish or not.

doddy

doddy
  • Members
  • 6 posts

Posted 19 April 2002 - 12:59

I'm doing the same thing for Schema Creation.

Formerly, in IS6, we used LaunchAppAndWait to call a batch file, which called a Perl Script.  This Perl Script provided feed back like:

Creating Schema.... done
Creating Stored Procedures.... done

We quit the console with an 'exit' at the end of the batch file. (does that not work for yours?)

Now, in ISMP, I think split the Perl into separate calls, each launched by Runtime.exec.  This way I can drive a progress bar, or at least have a decent status window, instead of a nasty console.  The trickiest bit has always been getting error feedback from the batch file - seems the only way is to have the script create a status file, then have IS search it for success or failure etc.

I've tried different combinations:

Launch Perl directly.      
This runs silently, therefore no feed back from the script.

Call Perl in a batch file.
Again I think this ran silently - no console window.

'start' a new process in batch file.   -
Can launch the console window this way (only in later versions of dos), but this branches the process and we can't make the original batch file wait, therefore ISMP continues ahead of the Schema Creation.

doddy,
Belfast