Sign in with
Sign up | Sign in
Your question

Running a .bat file in a minimized cmd window

Last response: in Windows 2000/NT
Share
July 18, 2005 6:14:02 AM

Archived from groups: microsoft.public.win2000.general (More info?)

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
Anonymous
July 18, 2005 4:01:54 PM

Archived from groups: microsoft.public.win2000.general (More info?)

"KrazyKat" <KrazyKat@discussions.microsoft.com> wrote in message
news:46B04A6F-0380-4EF4-94CC-A4929E344D15@microsoft.com...
>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?

--
Steve Parry BA (Hons) MCP MVP

http://mvp.support.microsoft.com/
http://www.gwynfryn.co.uk
July 18, 2005 4:01:55 PM

Archived from groups: microsoft.public.win2000.general (More info?)

Steve,

"Steve Parry [MVP]" wrote:

> 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
Related resources
Anonymous
July 18, 2005 4:53:48 PM

Archived from groups: microsoft.public.win2000.general (More info?)

"KrazyKat" <KrazyKat@discussions.microsoft.com> wrote in message
news:0BC6F394-CD32-4263-B650-8EA2FFD6A614@microsoft.com...
> Steve,
>
> "Steve Parry [MVP]" wrote:
>
>> 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




"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?

--
Steve Parry BA (Hons) MCP MVP

http://mvp.support.microsoft.com/
http://www.gwynfryn.co.uk
July 18, 2005 4:53:49 PM

Archived from groups: microsoft.public.win2000.general (More info?)

Steve,

"Steve Parry [MVP]" wrote:

> "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
July 18, 2005 4:53:50 PM

Archived from groups: microsoft.public.win2000.general (More info?)

"KrazyKat" wrote:

> "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
Anonymous
July 18, 2005 6:24:00 PM

Archived from groups: microsoft.public.win2000.general (More info?)

"KrazyKat" <KrazyKat@discussions.microsoft.com> wrote in message
news:40BEE3FC-D819-47C1-939A-5B87CCBF8469@microsoft.com...
> Steve,
>
> "Steve Parry [MVP]" wrote:
>
>> "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"
>


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

--
Steve Parry BA (Hons) MCP MVP

http://mvp.support.microsoft.com/
http://www.gwynfryn.co.uk
July 18, 2005 6:24:01 PM

Archived from groups: microsoft.public.win2000.general (More info?)

"Steve Parry [MVP]" wrote:

> 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
Anonymous
July 18, 2005 6:32:01 PM

Archived from groups: microsoft.public.win2000.general (More info?)

"KrazyKat" <KrazyKat@discussions.microsoft.com> wrote in message
news:87BA9A22-A584-42C9-A213-A2F6AC13627A@microsoft.com...
> "KrazyKat" wrote:
>
>> "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)
>


Glad to have almost helped ;)  thanks for the feedback


--
Steve Parry BA (Hons) MCP MVP

http://mvp.support.microsoft.com/
http://www.gwynfryn.co.uk
Anonymous
July 20, 2005 2:42:02 AM

Archived from groups: microsoft.public.win2000.general (More info?)

I see that you've already resolved your problem but this may be of interest
to you:
http://www.joeware.net/win/free/tools/quiet.htm
It will launch a program/batch file but completely hide it from the user (ie
it will not even appear in the taskbar).


"KrazyKat" <KrazyKat@discussions.microsoft.com> wrote in message
news:46B04A6F-0380-4EF4-94CC-A4929E344D15@microsoft.com...
> 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
!