Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Hydropulse17
- Posts: 1
- Joined: 28 Sep 2014 15:46
#1
Post
by Hydropulse17 » 28 Sep 2014 16:03
Right now I have this:
Code: Select all
taskkill /f /IM explorer.exe
start explorer.exe
exit
I would like for it to launch a program, and then when I am finished with said program, press space bar or what ever to start explorer and exit the batch. I had done this before, but it's been ages and I don't recall how to do it.
-
aGerman
- Expert
- Posts: 4744
- Joined: 22 Jan 2010 18:01
- Location: Germany
#2
Post
by aGerman » 28 Sep 2014 16:51
START (/WAIT) should work.
Code: Select all
@echo off
taskkill /f /IM explorer.exe
start "" "C:\wherever\yourgame.exe"
pause
start explorer.exe
or
Code: Select all
@echo off
taskkill /f /IM explorer.exe
start "" /wait "C:\wherever\yourgame.exe"
start explorer.exe
The latter won't work if the program is only a launcher.
Regards
aGerman