Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a CMD or BAT in silent mode

How can I run a CMD or .bat file in silent mode? I'm looking to prevent the CMD interface from being shown to the user.

like image 292
Tammen Bruccoleri Avatar asked Jan 04 '09 16:01

Tammen Bruccoleri


People also ask

Should I use BAT or CMD?

BAT files help in starting the big programs in the Windows system and also for the maintenance. CMD has a programming language to run the scripts and is a command interpreter. BAT is a scripting language that has an interpreter. CMD does not run a sequence of commands and hence we can say that CMD is safer than BAT.

How do I run a batch file in Powershell silently?

Hidden Start (HStart) Unzip and run the program with HStartUI.exe, the process consists of three steps. Manually add or drop your batch file onto the window, make sure “Hide console window” is checked and optionally check “Run with highest privileges” if your script requires it.

What is silent CMD?

SilentCMD executes a batch file without opening the command prompt window. If required, the console output can be redirected to a log file.

Can CMD run in background?

start /B command is the most given answer, but the command will be closed when the terminal closed. and then CTRL C, close the terminal, the command will continue to run in background.


1 Answers

Include the phrase:

@echo off 

right at the top of your bat script.

like image 55
Frederick The Fool Avatar answered Oct 14 '22 04:10

Frederick The Fool