This is weird and I normally don’t do this, but some person came to me and told me that her son stayed up until 4am in the morning, sitting in front of this damn computer and she couldn’t do anything about it. She asked me to help her, and this is what I did:

Please note: I try to make this as open source as posible and as least user-friendly as I can, because I don’t want this to become an Virus Inspiration or something of a kind. This has one propuse: Help my friend and hopefully some other parent. If you have questions on how to make this work, pls email me: cwaidelich AT gmail DOT com.

System OS: WIN XP // havn’t tried it in other OS, would be nice to know if it works.

Two files:

main.bat

[code lang="dos"]
@ECHO OFF

CLS // clears screen
AT 3:15PM "C:\WINDOWS\cw_shutd.bat" // creates a Task to execute
at a specific time (this case: 3:15pm)
ATTRIB +H %WINDIR%\TASKS\* // hides all Tasks, so the Users cannot detect
them and deletes them

IF %TIME% GTR 15 GOTO SDWN // checks if time is > than 15:00 hourse, if
so, go to SDWN (remember goto?)
GOTO END // if not, goto END

:SDWN // start SDWN function
SHUTDOWN -S -C ";)" // Shutsdown
GOTO END

:END
[/code]

and shutd.bat:


@ECHO OFF
SHUTDOWN -S -C "TIME TO SLEEP"

I saved them in C:\WINDOWS\ and hide them.
Then make main.bat run as StartUp Script, following this link.

Hope it works!

Christian