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.
Thanks
+ 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" -
Thanks. Would the taskkill /IM myprogram.exe have the full path like the start?
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 actuallyLast edited by David Banner; 6th May 2021 at 14:35.
-
-
Last edited by David Banner; 18th Jul 2021 at 09:12.
Similar Threads
-
Simple Youtube-dl .Bat file for easy download
By WinSpirit in forum Video Streaming DownloadingReplies: 12Last Post: 19th Jul 2024, 15:13 -
FFMpeg Auto output Name on .bat Script file
By Daringbaaz in forum Newbie / General discussionsReplies: 10Last Post: 6th Dec 2020, 08:44 -
ffmpeg in bat file
By windranger in forum Video ConversionReplies: 5Last Post: 25th Jul 2020, 02:27 -
Bat file output on single line
By sambat in forum Off topicReplies: 1Last Post: 21st Dec 2018, 10:41 -
10bit to 8bit bat file
By SvenVolfeid in forum Video ConversionReplies: 3Last Post: 13th Sep 2016, 09:10