Could someone help me make a bat file to make a program close down then start again, or maybe restart is the term
I have the start part, what goes before it?
Isn't the echo off supposed to stop the black command window opening? I have another bat file and the window stays open. It has the echo off@echo off
Start "" "C:\Program Files (x86)\myprogram.exe"
edit: I see the echo off is not to stop the window opening. How do you stop it opening or make it close.
+ Reply to Thread
Results 1 to 5 of 5
Last edited by David Banner; 6th May 2021 at 13:57.
echo off simply disable the command echo-ing.. so every line in the batch file doesn't echo itself in the terminal window. It has the @ before to avoid to echo-ing in the command window itself
If the program starts correctly the command window should close automatically.
To kill a process, then relaunch it.. you can try:
taskkill /IM myprogram.exe
Start "My Program" "C:\Program Files (x86)\myprogram.exe"
I find if i don't have "" between start and the path it just get a command windows with the path to the folder the bat file is in
I just checked my other bat file the window does close actually
Last edited by David Banner; 6th May 2021 at 14:35.
Last edited by David Banner; 6th May 2021 at 16:52.