Running a Batch file in QUIET mode?

I am looking to run a batch file but need to run it in QUIET mode or SILENT mode - basically I need the DOS Window to be hidden from the user.
I am sure that I have done this before but cant remember how.

Thanks :)
KraneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SteveGTRCommented:
You might try:

command /c start /MIN yourbatch

This can be put in a shortcut or in test in the Run dialog.

Good Luck,
Steve
0
SteveGTRCommented:
Well that didn't quit work like I intended. You could set your shortcut properties to run minimized. If you needed to call another batch file from some processing you could do the "start /MIN youbatch".
0
pbarretteCommented:
Hi All,

You could use:
START /B

From the help:
"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"

So your batchfile would need to have some way to terminate itself.

pb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

nafeelmCommented:
Create a 'main.bat' file as follows:

cls
@echo off
a.bat
b.bat


(where a.bat & b.bat are the other batch files which have the main steps to be executed)

Also try it with the 'close on exit' option checkbox ticked.
0
pbarretteCommented:
Hi nafeelm,

Unfortunately, that solution will not work. This is because launching a batchfile directly within another batchfile will cause the first batchfile to exit. Therefore no other commands from the original batchfile will be executed.

For example:
Your MAIN.BAT contains commands to launch the A.BAT file, then the B.BAT file. Once A.BAT is launched, MAIN.BAT is terminated. This means that B.BAT will not be launched.

Also, both MAIN.BAT and A.BAT would be launched in full windows and therefore be visible to the user.

pb
0
SteveGTRCommented:
I like pbarrette's answer.
0
pbarretteCommented:
Hi SteveGTR,

Thanks.

pb
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.