I want to force a Windows7 Professional home pc, single administrator account, to shut down every day at a predefined time (e.g., 10pm). I want to make it cumbersome for the user to interfere with the shutdown.
-
My first ideas was running
shutdown.exe /s /t x
when the
computer starts, wherex
is the
difference between the system time
and 10pm in seconds. Unfortunately,
shutdown.exe /s
can be easily
canceled by callingshutdown.exe /a
. -
My second idea was using Windows'
task scheduler to schedule
shutdown.exe /s /t 0
at 10 pm. This
can easily be circumvented by
fiddling with the system time. -
A VBScript that
Sleep
s until 10pm
and then shuts down can be stopped from
the task manager.
Please assume the user is aware of the method I install to force the shutdown. (E.g., renaming shutdown.exe
to an unknown name is not an good solution, because the user will discover the unknown name). Internet access is available, but I would like to avoid much more additional traffic/connections because of this.
The user is not generally malicious and will not take action at 4pm to cancel a shutdown. At 9.50pm, on the other hand, he might be tempted to cancel the next shutdown. The user will not remove programs from the startup folder.
Best Answer
We may be going about this in the wrong way. We can't really control a user from preventing a shutdown process when they are logged in as an admin. What you can do is control is the computer has power or not.
Get a power strip with a timer attached and set it to go off at like 10:15 or 10:30. Secure that strip so the user can't easily access it. If they shut down the PC like they should, the power strip will not affect them. If they ignore the timer or get around it, the system will loose power, effectively shutting down the PC.
This has the added benefit of preventing the user from being able to restart the machine after 10PM. That's the problem with a shutdown event, it only happens once and doesn't protect against the user turning the machine back on.
BIG CAVEAT (PLEASE READ BEFORE IMPLEMENTING)
Suddenly cutting power to a machine can damage your system. While most hard drive are able to handle sudden power loss, your OS may not. There is the potential that your OS may corrupt itself or have other associated problems. This is a Do at your own risk" suggestion.
If you like the idea of cutting power. You might just plug the monitor into the timed surge strip. It would effectively make the computer unusable and won't damage your system. As long as they can't switch the cord out or plug into another outlet, this should work.
Hope this helps (It might be crazy enough to work)