91Views2Replies

Author Options:

Looking for a batch file to let someone know they have 2 hours to use the computer then 10 mins before shutdown Answered

A file that loads at start up pops up a screen that warns time remaining to use the computer then 10 mins before warns to save work then shut down the computer

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
thegeeke
thegeeke

Best Answer 7 years ago

I agree that a client server system is better; but see if this does what you want:

@echo off
color 0c
title Timekeeper
cls
echo You have two hours to do what you want. Be sure that your work is saved.
timeout 6600
rem if you want the computer to restart instead of shutdown, change -s to -r, or -l for log-off.
shutdown -s -t 600 -c "The computer will shutdown in 10 minutes. Please save all of your work."
exit


If you use the above, I would suggest using a program such as "no close" to be sure that they can't just close the window to stop the timekeeper. That still doesn't stop them from using control-c. Like I said, client server setups are better for this type of thing. :)

0
mpilchfamily
mpilchfamily

7 years ago

DO you really want the PC powering up and shutting down very 10 minutes? You may want to put together a server client setup. Then the user has to log into the client PC and the server PC can keep track of login time, issue warnings and force log off.