Help with batch file
We have some laptops that we would like to shut down at 11pm every evening. Ive done a simple batch file to shut things down and run as a scheduled event. However, I need the file to also answer a question.
See when the computer is being rebooted, manually shut down, etc one of our processes comes up and asks "ok to terminate batch file yes/no". I need to find a way to get the shutdown file to say yes.
Right now the file simply states "shutdown -s t- 0"
Any ideas?
See when the computer is being rebooted, manually shut down, etc one of our processes comes up and asks "ok to terminate batch file yes/no". I need to find a way to get the shutdown file to say yes.
Right now the file simply states "shutdown -s t- 0"
Any ideas?
Comments
-
tiersten Member Posts: 4,505
Change the 0 to 5. It will shutdown after 5 seconds and the batch should have finished by then. -
tiersten Member Posts: 4,505
I'm assuming that you've actually got "shutdown /s /t 0" in your batch file... -
Bokeh Member Posts: 1,636 ■■■■■■■□□□
Thanks but that didnt work. Still comes up with ok to terminate batch file. I'll keep digging on this. -
Bokeh Member Posts: 1,636 ■■■■■■■□□□
The file in question is outlookrestart.exe. It keeps outlook open for the employees so they don't shut it down and forget to check their emails. I think I need to stop this process first, then do the shutdown. All of this on XP pro. -
Bokeh Member Posts: 1,636 ■■■■■■■□□□
Nope same thing. Goes to shutdown, then I get the message ok to terminate batch file yes/no. If I dont respond, then I get another message saying system cannot end this program because it is awaiting a response from you. -
dynamik Banned Posts: 12,312 ■■■■■■■■■□
The file in question is outlookrestart.exe. It keeps outlook open for the employees so they don't shut it down and forget to check their emails. I think I need to stop this process first, then do the shutdown. All of this on XP pro.
Maybe try this: PsKill v1.12 -
Bokeh Member Posts: 1,636 ■■■■■■■□□□
I think I got it finally.
Close outlookrestart
tskill outlookrestart
shutdown -s -t 5