how can i hide the DOS window when executing a batch file ?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
suhasmahajan85
Posts: 5
Joined: 10 Sep 2009 22:53

how can i hide the DOS window when executing a batch file ?

#1 Post by suhasmahajan85 » 14 Sep 2009 05:12

how can i hide the DOS window when executing a batch file ?

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#2 Post by avery_larry » 14 Sep 2009 11:04

You'd probably have to use AT scheduler or something to truly hide it. You can use:


start /b

to exectue a subcommand without a new window, but you'll still have the "parent" window.


You can use:

start /min

to at least start a command window minimized.

GeekyGuyJax
Posts: 4
Joined: 21 Sep 2009 14:56

Re: how can i hide the DOS window when executing a batch fil

#3 Post by GeekyGuyJax » 21 Sep 2009 15:19

suhasmahajan85 wrote:how can i hide the DOS window when executing a batch file ?


Hi,

there is a small utility out there called "RunHiddenConsole". It was
developed to run batch files completely hidden without showing (or
annoying flasing) the console window. You can go to http://www.msfn.org/board/tool-hide-con ... 49184.html
then register and download it. Works Great btw.

GeekyGuyJax..

Rage
Posts: 5
Joined: 08 Oct 2009 05:30

#4 Post by Rage » 08 Oct 2009 05:58

You can simply convert the bat to an exe using a converter, this brings up no cmd window and has the same effect (at least in what I've tested so far), or you can make a vbs that executes your bat like this:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\path\filename.bat" & Chr(34), 0
Set WshShell = Nothing

Although this means you need both a vbs and a batch file.

Rage
Posts: 5
Joined: 08 Oct 2009 05:30

#5 Post by Rage » 08 Oct 2009 08:12

Does anybody know how to make a batch file open a new cmd subcommand without a window? I already tried;

start cmd /b

that just has the same effect as ;

start cmd

so the /b swich has no effect there the /min does not work either, any ideas?

Rage
Posts: 5
Joined: 08 Oct 2009 05:30

#6 Post by Rage » 08 Oct 2009 09:06

Ah switch in wrong place, its;

start /b cmd /c

This will run a subcommand with no window then terminate when the line has run.

Post Reply