Starting a program minimized via Batch
I have been searching around on a way to do this, but the /min command does not start my MP3 file minimized.
Here is the code:
start /min song1.mp3 «cd /d %
The program I’m using to play the MP3 is Windows Media Player.
2 Answers 2
You cannot start the media player minimized when letting play a music track.
Как запустить exe через bat minimized
Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.
What can I do to prevent this in the future?
If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.
If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.
Another way to prevent getting this page in the future is to use Privacy Pass. You may need to download version 2.0 now from the Chrome Web Store.
Cloudflare Ray ID: 71ad98773c1e8fd0 • Your IP : 82.102.23.104 • Performance & security by Cloudflare
Starting a program minimized via Batch
I have been searching around on a way to do this, but the /min command does not start my MP3 file minimized.
Here is the code:
start /min song1.mp3 «cd /d %
The program I’m using to play the MP3 is Windows Media Player.
![]()
2 Answers 2
You cannot start the media player minimized when letting play a music track.
How to run a batch file or another file minimized

Microsoft Windows users can run batch files or other files in a minimized window using the command prompt start command. Running a batch file minimized is useful for when you need to run a batch file but don’t want the user to interrupt its operation. Below is an example of how the start command can start the batch file myfile.bat as a minimized window.
Additional information about this command and other options it’s able to perform is on our start command page.
If the batch file does not end with the exit command, it keeps an MS-DOS command prompt window open after the batch file is closed. Alternatively, you can use the following command to start a batch file and also exit the window.
To start the same line from a scheduled task, enter the command below into Windows Task Scheduler.
How to run a batch file or another file minimized

Microsoft Windows users can run batch files or other files in a minimized window using the command prompt start command. Running a batch file minimized is useful for when you need to run a batch file but don't want the user to interrupt its operation. Below is an example of how the start command can start the batch file myfile.bat as a minimized window.
Additional information about this command and other options it's able to perform is on our start command page.
If the batch file does not end with the exit command, it keeps an MS-DOS command prompt window open after the batch file is closed. Alternatively, you can use the following command to start a batch file and also exit the window.
To start the same line from a scheduled task, enter the command below into Windows Task Scheduler.
How to run .BAT files invisibly, without displaying the Command Prompt window
Batch files (.BAT) and Windows NT Command Script (.CMD) files run in console window when double-clicked. This means that the Command Prompt window will be visible until the .BAT or .CMD file execution is complete.

To make .BAT or .CMD file execution less intrusive, you can configure it to run minimized. Or if the .BAT or .CMD file does not require user input during run time, you can launch it in invisible mode using a Script.
The built-in Task Scheduler in Windows is capable of launching programs in hidden mode. If you don’t want to proceed via the Task Scheduler route, check out the options discussed in this article.
Running .BAT or .CMD files in minimized mode
- Create a shortcut to the .BAT or .CMD file. To do so, right click on the file, click Send To, Desktop (create shortcut)
- Right click on the shortcut and choose Properties
- In the Run: drop down, choose Minimized
- Click OK
- Double-click the shortcut to run the batch file in a minimized window state.
Running .BAT or .CMD files hidden (invisible mode) Using Script
Windows Script Host’s Run Method allows you run a program or script in invisible mode. Here is a sample Windows script code that launches a batch file named syncfiles.bat invisibly.
Reference: Run Method. Setting intWindowStyle parameter to 0 hides the window.
-
Copy the following lines to Notepad.
Running .BAT or .CMD files hidden (invisible mode) Using NirCmd
NirCmd is a multipurpose command-line automation utility from the third-party vendor Nirsoft. We’ve covered NirCmd many times in the past on our site.
We can use NirCmd to run a program, script or batch file in hidden mode.
Download NirCmd and extract the file to your Windows directory.
From the Run dialog or Command Prompt, use the following syntax to launch a batch file or program in hidden mode:
Example:
If you need to run the batch file elevated (as administrator), use the following command instead:
That’s it! If you know any other method to run a batch or CMD file in hidden mode, let us know.
One small request: If you liked this post, please share this?
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
report this ad
About the author
Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.
48 thoughts on “How to run .BAT files invisibly, without displaying the Command Prompt window”
AutoHotkey can run things hidden too…
Run, somebat.bat, , Hide
…or…
Run, %1%, , Hide
…put the 2nd example in RunHidden.ahk…then add a Run Hidden option to the .bat right-click menu…
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\batfile\Shell\RunHidden\Command]
@=”\”C:\\Program Files\\AutoHotkey\\AutoHotkey.exe\” \”C:\\Program Files\\AutoHotkey\\RunHidden.ahk\” \”%1\” %*”
…I didn’t test that, but I hope you get the idea anyway…also I don’t know if this blog supports…
[code]test[/code]
…tags…so I didn’t use them…& no preview…
You can use the Arguments property to pass command line parameters:
WshShell.Run chr(34) & “C:\Batch Files\syncfiles.bat” & Chr(34) & WScript.Arguments(0), 0
I found it useful to verify the command string before putting it into the script:
WScript.Echo chr(34) & “C:\Batch Files\syncfiles.bat” & Chr(34) & WScript.Arguments(0)
Hope that helps!
Thank you! Worked great, I was using a .cmd script to run every 5 minutes and it was rather annoying that the command prompt window would pop up every 5 minutes to run it. The VBS you gave made it run completely invisible now. Thanks again.