How can I execute a Windows command line in background?
This is a little late but I just ran across this question while searching for the answer myself and I found this:
START /B program
which, on Windows, is the closest to the Linux command:
From the console HELP system:
C:\>HELP START Starts a separate window to run a specified program or command. START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B] [command/program] [parameters] "title" Title to display in window title bar. path Starting directory. B Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application.
One problem I saw with it is that you have more than one program writing to the console window, it gets a little confusing and jumbled.
To make it not interact with the user, you can redirect the output to a file:
START /B program > somefile.txt
I suspect you mean: Run something in the background and get the command line back immediately with the launched program continuing.
START "" program
Which is the Unix equivalent of
Your question is pretty vague, but there is a post on ServerFault which may contain the information you need. The answer there describes how to run a batch file window hidden:
You could run it silently using a Windows Script file instead. The Run Method allows you running a script in invisible mode. Create a
.vbsfile like this one
Dim WinScriptHost Set WinScriptHost = CreateObject("WScript.Shell") WinScriptHost.Run Chr(34) & "C:\Scheduled Jobs\mybat.bat" & Chr(34), 0 Set WinScriptHost = Nothing
and schedule it. The second argument in this example sets the window style. 0 means "hide the window."