As soon as you click or close the cmd.exe window that the batch file is working, it is "in the background" - I'm not sure what you want, but it looks like you can ask how to run the batch file without displaying the cmd.exe window.
If this is the case, I can think of two ways: firstly, you can create a shortcut for the batch file, right-click it, and in the properties set the shortcut to run with the minimum value (there should be a drop-down option next to Start),
You can also transfer a batch file call to a VBScript file using the Windows Script host shell object ( invoking the launch method ) to run the batch file invisibly. Passing 0 as an intWindowStyle parameter will suppress the display of the window or something else.
Josh petrie
source share