Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Running a Batch file in QUIET mode?

Posted on 2003-03-24
8
Medium Priority
?
4,636 Views
Last Modified: 2012-06-27
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 :)
0
Comment
Question by:Krane
  • 3
  • 3
7 Comments
 
LVL 30

Expert Comment

by:SteveGTR
ID: 8203235
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
 
LVL 30

Expert Comment

by:SteveGTR
ID: 8203262
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
 
LVL 10

Accepted Solution

by:
pbarrette earned 160 total points
ID: 8205155
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Expert Comment

by:nafeelm
ID: 8216928
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
 
LVL 10

Expert Comment

by:pbarrette
ID: 8220040
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
 
LVL 30

Expert Comment

by:SteveGTR
ID: 9624721
I like pbarrette's answer.
0
 
LVL 10

Expert Comment

by:pbarrette
ID: 9630913
Hi SteveGTR,

Thanks.

pb
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question