Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to hide command window?

5 views
Skip to first unread message

Randall Smith

unread,
Jan 5, 2002, 1:40:29 AM1/5/02
to
I'm running a batch file as a task on Windows 2k. How can I keep the
command window from popping up evertime the batch file is executed?

-Randall


Al Dunbar

unread,
Jan 5, 2002, 2:58:01 PM1/5/02
to

"Randall Smith" <rsmi...@jam.rr.com> wrote in message
news:xdxZ7.57596$4d.20...@typhoon.austin.rr.com...

> I'm running a batch file as a task on Windows 2k. How can I keep the
> command window from popping up evertime the batch file is executed?

One way is to run it from a shortcut. Once the shortcut has been created, go
to the "shortcut" tab in its property page, and select "minimized" from the
drop-down list next to the word "Run".

/Al

Randall Smith

unread,
Jan 5, 2002, 4:06:19 PM1/5/02
to
Thank you so much. That worked perfectly.

-Randall

"Al Dunbar" <Luigi...@hotmail.com> wrote in message
news:aXIZ7.589$x%5.14...@news-rep.ab.videon.ca...

B-Mann

unread,
Jan 5, 2002, 4:32:41 PM1/5/02
to
If you want to completely hide the command window, you may want to convert
the batch file into a script file.
Another method would be to pass the batch file as a command line argument to
the following script:

----------------------8<-----------------------------

'** RunDOS.VBS **
Dim sCMD, i, WshShell
Set WshShell = CreateObject("WScript.Shell")
For i = 0 to WScript.Arguments.Count -1
sCMD = sCMD & " " & WScript.Arguments(i)
Next
WshShell.Run Trim(sCMD), SW_HIDE, False
Set WshShell = Nothing

----------------------8<-----------------------------

The above script can be ran from a shortcut with the following command:

wscript RunDOS.vbs "cmd /c yourbatch.bat"

Be sure to include the path to RunDOS.vbs as well as the path to
yourbatch.bat.

I have also created a small executable that performs this same procedure.

B-Mann

"Randall Smith" <rsmi...@jam.rr.com> wrote in message
news:xdxZ7.57596$4d.20...@typhoon.austin.rr.com...

DobryDen

unread,
Jan 6, 2002, 3:09:27 PM1/6/02
to

Hi, B_Mann.

Your script does exactly what I was also looking for.
I will be interested to get your executable that performs this same
procedure in case it will be free.

Even you refuse, let me thank you for the tip

Best regards

Eric

On Sat, 05 Jan 2002 21:32:41 GMT, "B-Mann" <B__...@hotmail.com>
wrote:

Bob Smith

unread,
Jan 6, 2002, 11:32:57 PM1/6/02
to

cmd.exe /c start /min c:\yourbatch.bat

michael.e.g...@fritolay.com

unread,
Jan 28, 2002, 1:23:20 PM1/28/02
to
>> "Randall Smith" wrote:
>> > I'm running a batch file as a task on Windows 2k. How can I keep the
>> > command window from popping up evertime the batch file is executed?
>>
>> One way is to run it from a shortcut. Once the shortcut has been created,
>go
>> to the "shortcut" tab in its property page, and select "minimized" from
>the
>> drop-down list next to the word "Run".

That works fine if I double-click the shortcut from explorer, how do you call
a link from the command line or another batch file?

Mike


----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email ab...@newsone.net

Victor

unread,
Jan 28, 2002, 1:35:37 PM1/28/02
to
start linkname.lnk


<michael.e.g...@fritolay.com> wrote in message
news:a344uo$pbl$1...@news.netmar.com...


> >> "Randall Smith" wrote:
> >> > I'm running a batch file as a task on Windows 2k. How can I keep the
> >> > command window from popping up evertime the batch file is executed?
> >>
> >> One way is to run it from a shortcut. Once the shortcut has been
created,
> >go
> >> to the "shortcut" tab in its property page, and select "minimized" from
> >the
> >> drop-down list next to the word "Run".
>
> That works fine if I double-click the shortcut from explorer, how do you
call
> a link from the command line or another batch file?
>
> Mike
>
>
> ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the

michael.e.g...@fritolay.com

unread,
Jan 28, 2002, 6:24:28 PM1/28/02
to
>> >> "Randall Smith" wrote:
>> >> > I'm running a batch file as a task on Windows 2k. How can I keep the
>> >> > command window from popping up evertime the batch file is executed?
>> >>
>> >> One way is to run it from a shortcut. Once the shortcut has been
created,
>> >go to the "shortcut" tab in its property page, and select "minimized"
from
>> >the drop-down list next to the word "Run".

Mike wrote:
>> That works fine if I double-click the shortcut from explorer, how do you
>> call a link from the command line or another batch file?
>>

>Victor writes:
>start linkname.lnk
>

Kind of a catch-22 if you ask me. start is not recognized outside of a command
prompt window and that is exactly what I am trying to avoid.


----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----

0 new messages