- Mar 10, 2007
- 3,578
- 519
- 126
Long story short, I need explorer.exe to close before opening a program, stay closed while it's open, then restart when I close the program.
The first two steps were simple for me (my programming knowledge ranges from nonexistent to elementary), but the last step has me stumped.
What I have right now is:
Taskkill /f /IM explorer.exe
Start "" "C:\program\program.exe"
I'm not sure what to add next that doesn't involve a timer. All my attempts thus far either won't restart explorer or it starts it immediately after the program starts. Any help is appreciated. I know I can just start explorer manually from the task manager but that defeats the whole purpose of using a batch file.
Edit: The sad emoticon made me laugh since it fits the mood of the thread.
The first two steps were simple for me (my programming knowledge ranges from nonexistent to elementary), but the last step has me stumped.
What I have right now is:
Taskkill /f /IM explorer.exe
Start "" "C:\program\program.exe"
I'm not sure what to add next that doesn't involve a timer. All my attempts thus far either won't restart explorer or it starts it immediately after the program starts. Any help is appreciated. I know I can just start explorer manually from the task manager but that defeats the whole purpose of using a batch file.
Edit: The sad emoticon made me laugh since it fits the mood of the thread.