On Linux, I could do this just doing:
myprogram &
However on Windows... If I start a command like:
start /B myprogram.exe
It runs in the background, but if I close my command prompt, the myprogram.exe is not killed. How to make it be killed automatically when the command prompt is closed?
Related question:
cmd /ccommand before it. – Biswapriyo Jul 29 '17 at 01:37cmd /c npm run watch, but the console still locked into the node process. Did you meancmd /c start /B npm run watch? Update, I tried this last one and worked! What magic is this? – user Jul 29 '17 at 01:58startdoesn't make the program "run in the background". It makes it run as a child of the desktop process. There are equivaments in Linux desktop environments (kstartfor KDE, for instance). – xenoid Jul 29 '17 at 08:42start /bcommand starts application without creating a new window. – Biswapriyo Jul 29 '17 at 10:29commmand &which start the application, but if the window closes, the application closes also. – user Jul 29 '17 at 19:12start /bdoesn't start the process in background and just starts a process that doesn't belong to the current console – phuclv May 05 '19 at 08:10