Running a .bat file in a minimized cmd window

G

Guest

i have a set of bat files which are executed from some (Java) application. in
order to get them to work, i need "cmd.exe /c ..." to start them.

i would now like to have the command window minimized to avoid too much
confusion for the users. is this possible and how?

tia,

thomas
 
S

Steve Parry [MVP]

KrazyKat said:
i have a set of bat files which are executed from some (Java)
application. in
order to get them to work, i need "cmd.exe /c ..." to start them.

i would now like to have the command window minimized to avoid too
much
confusion for the users. is this possible and how?

tia,

thomas


from a CMD prompt type
start /?
to view the "start" commands options, it may be of use to you?

HTH?
 
G

Guest

Steve,

Steve Parry said:
from a CMD prompt type
start /?
to view the "start" commands options, it may be of use to you?
did that, but couldn't find anything useful. or did i overlook something?

thomas
 
S

Steve Parry [MVP]

KrazyKat said:
Steve,


did that, but couldn't find anything useful. or did i overlook
something?

thomas




"B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application"


I thought the B switch may be of use?
 
G

Guest

Steve,

Steve Parry said:
"B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application"


I thought the B switch may be of use?
sounds like it, but i can't get it to work. what would be the correct
syntax? following is the line which i execute and which seems to be the only
working version so far. i couldn't find a place to put the "B" and have it
still working:

"cmd.exe /c start "Service Window {0}" cmd /c "C:\\CONTINUITY\\serv
window.bat {0} {1} || pause"

thomas
 
S

Steve Parry [MVP]

KrazyKat said:
Steve,


sounds like it, but i can't get it to work. what would be the correct
syntax? following is the line which i execute and which seems to be
the only
working version so far. i couldn't find a place to put the "B" and
have it
still working:

"cmd.exe /c start "Service Window {0}" cmd /c "C:\\CONTINUITY\\serv
window.bat {0} {1} || pause"


do you even need the "cmd.exe" part?
 
G

Guest

KrazyKat said:
"cmd.exe /c start "Service Window {0}" cmd /c "C:\\CONTINUITY\\serv
window.bat {0} {1} || pause"

using the /MIN switch does just what i want: "cmd.exe /c start "Service
Window {0}" /MIN cmd /c "C:\\CONTINUITY\\servwindow.bat {0} {1} || pause"

thanx, Steve, for putting me on the right track (i kept looking for switches
in cmd.exe)

thomas
 
S

Steve Parry [MVP]

KrazyKat said:
using the /MIN switch does just what i want: "cmd.exe /c start
"Service
Window {0}" /MIN cmd /c "C:\\CONTINUITY\\servwindow.bat {0} {1} ||
pause"

thanx, Steve, for putting me on the right track (i kept looking for
switches
in cmd.exe)


Glad to have almost helped ;) thanks for the feedback
 
G

Guest

Steve Parry said:
do you even need the "cmd.exe" part?
yes, apart from the fact that it gives me a chance to see stdout/stderr of
my application
i need a "real" executable as it is launched from a Java application.

thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top