Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Bat files

  1. Mar 9, 2004 #1
    i don't know if this is even the right forum but i am trying to right a batch file which will close certain running programs, launch a game, and upon exit of the game, run the programs that were closed. i know how to close a prog and open the game, but i don't know how to run the progs when the game exits.
  2. jcsd
  3. Mar 9, 2004 #2


    User Avatar
    Science Advisor

    I'm not real sure if that is doable, unless the game sends some kind of code on exit that could execute a batch file.

    What game is it? What programs? Perhaps your best bet would be to simply create a batch file that executes your programs, then use this to start the programs, and a command within this batch starts the game and closes the programs.

    As to restarting the programs when the game exits, I'm stumped.
  4. Mar 10, 2004 #3
    I'm with Megashawn. You need some sort of event synchronization that runs when the game is shut down. What you are doing is beyond the scope of a batch file. Batch files are for triggering a series of events, not being triggered by those events. Although they can be made to have some structure, I recommend looking at something like VBScript that was meant for these kind of things.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Bat files
  1. .rar files (Replies: 11)

  2. Recovering File (Replies: 2)

  3. Daa files (Replies: 2)

  4. Batch file (Replies: 2)

  5. Deleting these files? (Replies: 1)