9

I have a 14 year old boy who's obsessed with his gaming PC so much that he stays awake all night sometimes and sleeps all day.

Normally that would cause havoc with his schooling but he's being home schooled where he lives with his mother.

Is there some way to make the computer unusable after a certain predetermined time we can set so his PC shuts off, let’s say at 10:00pm and won't start till 7:00am?

1
  • 2
    What Operating System is installed on the computer?
    – joeqwerty
    Commented Apr 11, 2014 at 21:20

7 Answers 7

7

The best way is to setup Parental Controls to limit logging in, and a scheduled task that'll shutdown the pc at the time he must go to bed.

To setup parental controls

  1. Go to the control panel, User Accounts.
  2. Click Manage another account
  3. At the bottom choose Set up Parental Controls
  4. Either select his user with limited rights, or if there's just one user, press the Create a new user account link.
  5. Select the limited uesr
  6. Click On, enforce current settings
  7. At the right, select the Off link besides Time.
  8. In the new dialog, select which hours he is allowed to be on and which hours he is not allowed to be on.

To setup automatic shutdown

  1. Go to the control panel, administrative tools, Task Schedular.
  2. Click below Task Schedular (Local) on Task Schedular Library.
  3. On the right, Choose Create Task...
  4. Give it the name `Automatic Shutdown
  5. Go to the tab Triggers
  6. Press New...
  7. Either select Daily (every day) or Weekly (to specify which days)
  8. At the top right, select the time the pc has to automatically shut down.
  9. Press OK.
  10. Go to the tab Actions.
  11. Press New...
  12. Below Program/script: enter the following shutdown
  13. To the right of Add arguments enter: -s -f -t 10 (the -t 10 gives a 10 second countdown before the shutdown starts. Note that you can abort a shutdown by entering shutdown -a. If you want to prevent being able to block this, change to -t 0 which makes the shutdown immediate. A second task that starts earlier can be to display a message.
  14. Press OK. and OK again.

Thats it.

EDIT: I just tested the parental controls. If the user is not allowed to be on, windows will automatically log off the user. The user can't log in until they are allowed again, and the user has a shutdown button to shut down the pc. Any open programs/games will not save correctly, but thats also what the scheduled task will do.

3
  • 2
    I'd also add in to remove the targeted user account from the local administrator group, if it is a member.
    – canadmos
    Commented Apr 12, 2014 at 0:10
  • @LPChip, the difficult part is to ensure the computer will shoudown after reboot, this can be achieved by enabling repetition. And I enable start after missed. This could lead to repeat shutdown at daytime if I dont start my PC for several days.
    – e-cloud
    Commented Nov 15, 2017 at 17:03
  • @e-cloud if you use parental controls, there is no need. it will ensure the user is being logged off. There's no point in keeping the pc on after that, so it will be turned off.
    – LPChip
    Commented Nov 15, 2017 at 17:53
4

In case someone doesn't want to set up parental control (someone wants to lock the computer from themselves, not their kids), here is another solution using only Task Scheduler, which I'm currently using:

  1. Start menu --> Type "Task Scheduler" --> Open Task Scheduler.
  2. Create New Task
  3. Set these properties in the General tab:
    • Name: choose a task name
    • Check Run only when user is logged on
  4. In the Triggers tab:
    • "New..."
    • Beginning the task: On a schedule
    • Settings: Daily
    • Set the hour you want to turn off your computer
    • Check Repeat task every: 5 minutes for a duration of 1 hours (or 8-9 hours, depending on you)
    • Check Stop all running tasks at end of repetition duration
    • Check Enabled
    • OK
  5. In the Actions tab:
    • "New..."
    • Action: Start a program
    • Program/script: powershell.exe
    • Add argument: -command add-type -assemblyname System.Windows.Forms; [System.Windows.Forms.Application]::SetSuspendState([System.Windows.Forms.PowerState]::Suspend, $false, $false)
  6. In the Conditions tab:
    • Uncheck everything
  7. In the Settings tab:
    • Uncheck everything

This schedule will put your computer to sleep at the chosen time. If you try to turn the computer back on, it will continue to sleep every 5 minutes (in 1 or 9 hours - depending on your setup). This sleep action cannot be prevented. The computer went sleep, not turn off, so no worry about unsaved work.

Note: there is no warning display before the computer goes to sleep. You can create another Task Schedule to remind you of sleep time.

1

I believe you could do this by changing the local accounts logon hours then setting a local GP to force logout when they expire.

net user [user] /times:m-f,08:00-17:00

My command allows [user] logons Monday to Friday from 08:00 – 17:00 local time.

Then go into gpedit.msc and set the policy linked below: http://technet.microsoft.com/en-us/library/jj852195.aspx

*Note it won't shutdown the PC it'll log user out, you could find a LGP for that as well maybe.

2
  • Its best and simplest way to manage a job. And you still can login under different user. Shutdown via scheduler is significantly complex in setup, cant be easily managed, and tricky in testing.
    – vitrilo
    Commented Jan 5, 2018 at 11:14
  • Not if there is only the one user account they can access. Commented Jan 5, 2018 at 11:21
0

If he's playing online games (or games that require an online account) I would suggest making a rule in the router. My friend has his router blocking certain traffic at certain times...to keep his kids off the internet after hours.

You can check this out for setting up parental controls as well. http://windows.microsoft.com/en-us/windows/set-parental-controls#1TC=windows-7

0

OpenDNS Home... DNS Web Filering, allows you to block websites from anyone inside your home network no matter what device is used. They have a free version.

0

I'm assuming, since he's gaming, we're talking Windows 7 or 8 here.

Try Task Scheduler (Window key, type "Task Scheduler", enter).

Set it for 10:00 and have it run "shutdown.exe /s". You can mark the task as hidden and have another one at 10:05 and 10:10 for when he boots the computer back up. (I donno if I actually approve of this style of parenting, but whatever)

1
  • I just looked up and saw someone beat me to this idea. Ah well.
    – sighmer
    Commented Apr 11, 2014 at 22:51
0

You didn't specify if the gaming is online, but if it is, then you could set the PC he is using to have access permissions inside the specified hours. Many routers allow you to do this.

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