View Full Version : Exec Wizard Action Problem

Terry R
03-26-2003, 01:17 PM
I'm trying to use an Exec Wizard Action to run a windows batch (.bat) file.

I've configured the action with the following settings:
Command: $D(lib)/cmd.exe
Arguments: $P(absoluteInstallLocation)/Examples/SimpleTest.bat
Bundle: False
Wait: False

I've tried with and without the Stdout and Stderr destinations set.

What appears to happen is a new subdirectory (named ".exe") is created in the source location, where the installation is launched from, but the bat file doesn't run.

This is really bizarre. Has anyone got this action to work?


03-26-2003, 01:31 PM
First of all, try this:



and prepare to see a new dos window during setup.

Terry R
03-26-2003, 02:52 PM
Thanks for the tip. I was missing that "/c" piece with the argument. I also found that I needed to put quotes aroudn the argument, since the default windows install path is to "Program Files" and cmd.exe doesn't deal with the spaces without the quotes in place.


Terry R
03-26-2003, 06:10 PM
OK, this seems to be working, however, it's as though the window is being invoked in a hidden state.

This might be fine for some applications, but the user actually needs to interact with the program that I'm launching.

Is there an option that I'm missing somewhere to tell ISMP to show the window for the executable that is being launched?


Jeff Dillon
03-26-2003, 11:47 PM
The console window appearing is a bug with the 1.3.1 JVM. It was fixed in 1.4.

There is no possible way to disable that window with 1.3 JVMs, AFAIK.

This was the number one rated bug against Sun's 1.3.1 JVM.

Terry R
03-27-2003, 01:53 PM
So, is there a way to have the console window show up when I launch an external batch file?

The file I'm launching actually invokes a java class that requires user input. Without the console window, there's no possibility of user input.

Any ideas?

Jeff Dillon
03-27-2003, 02:09 PM
>So, is there a way to have the console window show up when I >launch an external batch file?

With 1.4, I believe the only way to do this is to launch the terminal yourself with an exec action. On NT this would be something like...

cmd /c batfile

The better option would be to collect the input in a User Input Panel and modify your script to take arguments.

Terry R
03-27-2003, 02:17 PM

That's what I'm trying to do.

I've setup an Exec Wizard Action to execute the command


with arguments

/c $P(absoluteInstallLocation)/Examples/SimpleTest.bat

The problem is that the console window for this action doesn't show up.

I can launch explorer.exe with the argument $P(absoluteInstallLocation)/Examples, and it shows up fine.

I'm thinking this is the route I'll go, if we can't find a solution to the console window. I'll just instruct the user to double-click the SimpleTest.bat file.


03-30-2003, 09:31 PM
We were having the same problem with the console window appearing when we invoked java.exe on a Windows machine. We got around it by calling javaw.exe instead of java.exe. javaw.exe is a Windows specific way of invoking the JVM without bringing up a console window.

Don't know if you can use this; however, just thought I'd post this bit of information.

Terry R
04-01-2003, 12:23 PM
Thanks for the suggestion. My problem, however, is that I DO want to see the console window and it is NOT appearing.

If anyone has an idea how to get the Exec action to actually open a console window that would be great.


04-08-2003, 02:55 PM
Remember - If you are targeting Windows 9x platforms, the correct command is "command", not "cmd".

Terry R
04-08-2003, 02:57 PM

Thanks for the tip. However, currently we're targeting Windows NT/2000, where I'm using cmd.exe, and Solaris/AIX, where I'm using /bin/sh.


04-23-2003, 07:40 PM
How about get the input yourself via dialogboxes, and feed them to your batchfile? Redirect the output if you need them. Just a thought.... In a DOS box, type "cmd /?" for lots of command options. Give "cmd /C cmd my.bat" a try. Good luck.

04-24-2003, 09:49 AM
Perhaps the "start" command might help?!
Using "start command" you can open a new window...
Look what parameter of start might be right... (-> start /?)