6

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, where x is the difference between the system time and 10pm in seconds. Unfortunately, shutdown.exe /s can be easily canceled by calling shutdown.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 Sleeps 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.

12
  • +1 Good description... I'm trying to think of a way now... Commented May 31, 2011 at 11:50
  • 5
    As long as the user is an administrator and somewhat capable, he can easily stop the shutdown. Especially if he has time to prepare.
    – cularis
    Commented May 31, 2011 at 12:02
  • Is there a trusted PC on the LAN that you could use to initiate a shutdown remotely? Commented May 31, 2011 at 12:06
  • @Randy: No, it's a single pc. What infrastructure would be needed to issue a shutdown command over the internet?
    – u17
    Commented May 31, 2011 at 12:11
  • 1
    @Doltknuckle - We're not totally veering off-topic - @Frank has asked for a method which cannot easily be circumvented. Fortunately, he's not asking for total security - just something that makes it "cumbersome for the user to interfere with the shutdown". So, a BIOS password and "Limited User" account are definitely appropriate. A physical case lock may be extreme-ish, but is still pursuant to that goal.
    – Iszi
    Commented May 31, 2011 at 19:05

5 Answers 5

3

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)

1
  • +1, great answer, very creative! It is a laptop, but putting the external screens it uses on the strip (maybe the desk lamp too) will be a strong signal and will even eliminate the danger of damage to the pc.
    – u17
    Commented May 31, 2011 at 20:41
8

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.

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.

1
  • Agreed, "control" is difficult. "Disciplin", on the other hand, seems possible. Think about starting 100 shutdown VBScripts at startup. The user may not bother to cancel every one of them through the task manager [or write a script that does it]. Canceling 100 VBScripts is more cumbersome than changing the clock or running shutdown.exe /a, but resource-wise it is not a good idea. Any ideas are appreciated.
    – u17
    Commented May 31, 2011 at 15:58
1

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.

2
  • Lolz. this task is cumbersome in it self!
    – Gen1n
    Commented Sep 8, 2013 at 10:46
  • Counter: Run a batch script to abort shutdown in infinite loop: ` @echo off :: GOTO point for looping purposes :START :: Abort shutdown SHUTDOWN /A :: Goto START point for inifinite loop :GOTO START `
    – Gen1n
    Commented Sep 8, 2013 at 13:04
-1

Simple-ish solution to make it "combersome" is to implement many of these as fail safes, and reduce shutdown wait time to near 0. That way while they are preoccupied with one another will still in effect. Or if they think by removing one they're free and then suddenly the PC shuts down. Having a dozen hiding in wait and possibly another program hiding in system folders (with like names) to replace them as their deleted is pure madness. ;) There would be no way to stop it.

1
  • This would be better served as a comment.
    – Ramhound
    Commented Feb 2, 2017 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .