You are here: > >

How to run a batch file or other file minimized

Batch fileMicrosoft Windows users can run batch files or other files in a minimized window by using the command prompt start command. This is useful for when a user needs to run a batch file but doesn't want the user to interrupt its operation. Below is an example of how the start command can be used to start the batch file myfile.bat as a minimized window.

start /min myfile.bat

Additional information about this command and other options it's able to perform can be found on our start command page.

Note: If the batch file does not end with the exit command it will keep an MS-DOS command prompt window open after the batch file is closed. If you want for the user to not have to hassle with manually closing the window make sure to add this at the end of your batch file. Alternatively you can use the below command to start a batch file and also exit the window.

start /min myfile.bat ^& exit

To start the same line from a scheduled task enter the below command into Windows Task Scheduler.

cmd.exe /c start /min myfile.bat ^& exit

Additional information