krutobean.blogg.se

Batch file to close program
Batch file to close program











batch file to close program

I'll just go with my first method and stop the program manually, it's not a big deal. I didn't know at the time (or didn't understand is more like it) that there was nothing to end.

batch file to close program

Yeah, sorry I understand that now, as blargh mentioned also, the batch file just initiates a custom action as defined in the batch file and that's it, once it does that it's done. The wait 300 will wait 300 seconds (5 mins). START foobar2000.exe /command:Foobar2000/Close I would guess you'd need to download a wait program like this one: Here is the full list of command line arguments:įoobar2000 is another media player, and it does support launching any command from the command line, but you'd have to fiddle with it to get it to do what you want since you'll need a pause between the "open" and the "close". Unfortunatley it does not appear that there is such a command line argument. A Batch file ends when it is done firing all it's "bullets" - View image here: -Īnway, the only way to do it would be with a paramater in Windows Media Player that would play the song, then close. long explaination of why you can't find an "end". Once the bullet is fired, the gun has no control over the bullet, and once the batch file "fires" off a program it has no control over the program. Think of a batch file as a gun and a command as a bullet. there is no way for the batch file to "send" a "close/exit" command to Windows Media Player). When you use a batch file to launch a program, as soon as the program is launched, the batch file looses control of the program (i.e. The batch file ends, all by itself and does not need an "end" (at least not for what you are doing).Īll your batch file does is launch another program. The problem is you are looking for the wrong thing.













Batch file to close program