How to force 'shutdown' at predefined time, in administrator account?

Solution 1:

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)

Solution 2:

If the user is admin and knows it, there is no way to stop them from preventing shutdown. It sounds as though this is a kid's computer and you need them to get off at a certain time. Nobody should run their home computer as admin, even less so youth.

A scheduled task running the proper command is the best way to go, along with a changing of the user rights.

With Windows 7, if you've configured the accounts correctly, there is a pretty good parental controls tool from Windows Live that will allow you to set all sorts of different controls and limitations.

But the first step, as others have noted, is to change the users account to a User-level account, and create an Admin account you can access and do not make the password easy to guess.

Solution 3:

This question has so much going against it. Your problem is not a real one. Don't expect to control an Admin account. Make the user non-admin and you can do whatever you want.

Solution 4:

Use schtasks and run via runuser /RU "SYSTEM" and give the a name like "Local Service Update".

Now, even if someone lists all the scheduled tasks, they shall see a list of multiple system tasks, and the name to your tasks will also sound technical and the username wont give out the identity (cause the user would be "SYSTEM").

Now, the time maybe a problem so what you could do is create a batch program and have it run at, for say, 21:30hrs.

Give this batch program in /TR field.

(For a backup, in case the power goes out, create a task. Same concept, but at exact time of shutdown and a little different name.

@echo off

:: DELAYING TIME TILL 22:00HRS

PING -n 3600 127.0.0.0>NUL

SHUTDOWN /S /F

EXIT

Have the file stored somewhere impossible to find and as the schtasks doesn't show the executable path, it will be safe unless someone decides find the string "SHUTDOWN" in each and every file!

Also to mislead, I would highly suggest to make a scheduled task that says something like "goodnight"/"shutdown" or something easily caught so that the person might think that they has won but where as the actual file will be in the background like a ninja.