How to run a Batch Script in Background?

I have a Batch Script. I don't want it to show me the Command Prompt and run. I want it to run in the Background or in Silent Mode? How can I do it?

3 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Create a VBS file (i.e., a VB Script). Open Notepad, and type the following code in it:

    '=========================================

    Set WshShell = WScript.CreateObject("WScript.Shell")

    obj = WshShell.Run("H:\test.bat", 0)

    set WshShell = Nothing

    '=========================================

    Replace the "H:\test.bat" in the above code with the full path of your own BAT file, but do not forget the double quotation marks around the BAT file's full path.

    SAVE the file. Give it a name like HIDECMDWINDOW.VBS. The extension has to be VBS.

    Double click the VBS file to run it. Your BAT file should run without showing the command window.

    If your BAT file takes arguments, you can pass arguments to it too - the script for that will be a little more advanced, but if you need it, leave me a message.

  • 4 years ago

    Run Batch File In Background

  • Gail
    Lv 4
    4 years ago

    u need special program for that

Still have questions? Get your answers by asking now.