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/.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. Both options are discussed below.

Running .BAT or .CMD files in minimized mode

1. Create a shortcut to the .BAT or .CMD file. To do so, right click on the file, click Send To, Desktop (create shortcut)

2. Right click on the shortcut and choose Properties

3. In the Run: drop down, choose Minimized

4. Click OK

5. Double-click the shortcut to run the batch file in a minimized window state.

Running .BAT or .CMD files in invisible mode

Windows Script Host’s Run Method allows you run a program or script in invisible mode.

Sample Code

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0
Set WshShell = Nothing

Copy the lines above to Notepad and save the file with .VBS extension. Edit the .BAT file name and path accordingly, and save the file. Double-click the .VBS file to run it.

(Ref: Run Method. Setting intWindowStyle parameter to 0 hides the window)

Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner


  1. Tom
    said this on Saturday, March 28th 2015 12:32 am

    Awesome application!!! Would love the ability to copy and paste the GUID rather than have t export the .XML, rename that file and then do it again. Even better would be a data dump to a notepad or excel for rapid reference of the GUID.

  2. Qamer
    said this on Thursday, December 4th 2014 1:23 pm

    Awesome script bro…….. great work.

  3. Josh
    said this on Sunday, September 21st 2014 7:28 am

    Is there any way I can get it to shutdown when the batch file it runs crashes?

  4. Ritika
    said this on Friday, April 11th 2014 1:02 pm

    Even after doing this,it still shows the cmd window.

  5. Russ
    said this on Friday, February 28th 2014 9:45 am

    Useless explanation. What does “Copy the lines above to Notepad and save the file with .VBS extension.” mean???????

    What lines? I have a simple .bat file that I want to run “hidden”. This explanation looks really encouraging till I find an unexplainable statement like that.

    OK – I guess I’m just stupid.

  6. said this on Saturday, July 13th 2013 9:06 pm

    Marvellous! It is really helped us in WebLogic server to run in the background. it is almost equalent to Unix & and nohup.

  7. Ehab Shehata
    said this on Thursday, May 16th 2013 2:53 pm

    Marvellous, I used to run java jar files without showing comand screen.
    Thank you so much.

  8. Lenard-southgate
    said this on Tuesday, April 30th 2013 10:23 am

    thank you so much…i’ve been searching for almost 1 week now it’s done

  9. FariZE
    said this on Sunday, April 28th 2013 10:18 am

    Awesome Script dude! can I ask you? what the meaning of chr(34) ?

Leave a Reply