?
Solved

Running a Batch file in QUIET mode?

Posted on 2003-03-24
8
Medium Priority
?
4,565 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

762 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