Hi there!.
I'm trying to create a batch file that shuts the computer down when a app that the batch itself has started, is turned off.
Actually, i want it to start that app with some delay, but so far what i was able to acomplish was the batch to start the app with delay with the code as follows:
@Echo Off
PING 1.1.1.1 -n 1 -w 8000 >NUL
Start ""- "C:\Programas\TVR\TVR\tvr.exe"
exit
It start's the code with 8 seconds of delay, but now i want it to turn the computer off when the tvr.exe is closed manually.
I found that the "WMIC OS Where Primary=TRUE Call Shutdown" command shuts the computer down, but i can't make the rest of the code to work with it.
Btw i'm using windows xp.
Help is appreciated. Thanks in advance !
I'm trying to create a batch file that shuts the computer down when a app that the batch itself has started, is turned off.
Actually, i want it to start that app with some delay, but so far what i was able to acomplish was the batch to start the app with delay with the code as follows:
@Echo Off
PING 1.1.1.1 -n 1 -w 8000 >NUL
Start ""- "C:\Programas\TVR\TVR\tvr.exe"
exit
It start's the code with 8 seconds of delay, but now i want it to turn the computer off when the tvr.exe is closed manually.
I found that the "WMIC OS Where Primary=TRUE Call Shutdown" command shuts the computer down, but i can't make the rest of the code to work with it.
Btw i'm using windows xp.
Help is appreciated. Thanks in advance !