3

How would I make this close itself when its done?

copy h2.cfg default.cfg /y
c:
cd "c:\program\reba"
"c:\program\reba\reba.exe"

i tried adding:

cls
@exit

in the end but i didnt work

edit: i want the cmd window to close when reba has loaded

1
  • Yeah, this should close itself fine on the end if reba.exe exits correctly. Commented Jan 17, 2010 at 0:26

1 Answer 1

4

You'll need to run reba.exe in the background.

The shell command START should do the trick for you. Here is some documentation on it:

http://ss64.com/nt/start.html

I think you can say something like

START "" "c:\program\reba\reba.exe"

in your batch file (i.e. just add the START).

Sign up to request clarification or add additional context in comments.

2 Comments

Note that you should never blindly use spaces around the first argument when dealing with start. This causes the argument to be interpreted as the window title for the new window and then the program to run is missing. Which means it will just spawn a new cmd window with the respective window title.
Ah, very interesting! That's why the doc I quoted makes those mysterious admonitions that you should always include a title, without giving a sensible reason why. This clears things up, thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.