Originally posted by yoyo
I think you can use task scheduler. Create a new scheduled task to shutdown.exe in C:\Windows\system32.
You will however have to create a task for each user and you need their username and password. If there is no password set you'll have to enable running scheduled tasks without password in the registry at HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Lsa set the value for limitblankpassworduse to 0 (that's a zero).
Open Control Panel - Scheduled Tasks
Add scheduled task
the wizard starts, click next
browse to C:\Windows\system32\shutdown.exe
choose a name for the task and click Perform this task - daily or anything else (we are going to change this later anyway)
click next and then change the proposed start time a little bit so that it will not shut down immediately
click next and enter user name and password
click next and check 'Open advanced properties for this task, when I click Finish', click Finish
In the advanced properties on the Task tab next to Run: add parameters to the command so that it looks like
C:\Windows\system32\shutdown.exe -l -t 10 -f (This will log off the user after ten seconds, be careful with the f switch, it forces to close programs whether the work is saved or not, it may cause a family crisis)
Change to the Schedule tab
click the arrow on the Schedule Task drop down menu and click When idle, adjust the time at 'Schedule Task When Idle'
Click OK