You don't want to log it off you want to shut it down, right? If the machine is XP then you can create a scheduled task to run shutdown.exe (found in %windri%\system32) and set it to wait until the system has been idle for whatever length of time. To do so, Go to Start -> Control Panel -> Scheduled Tasks -> Add Scheduled Task. Select the shutdown app in system32 and add the "-s" switch after it (no quotes). Select daily and any time after the current time plus some (so it doesn't execute while you're setting it up). Then enter credentials of a local admin account and on the last page of the wizard, enable the checkbox for advanced settings. On the Schedule tab, change it from Daily to When Idle and set the time you want it to wait.
If you're on an OS prior to XP, you'll need to do the same thing, but use a script to shut it down. Copy the text below and save it to a file with the .vbs extension (such as shutdown.vbs) to a location that is in the system PATH (such as c:\winnt):
Set colOperatingSystems = GetObject_
("winmgmts:{(Shutdown)}").
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Sh
Next
Then set your scheduled task to be cscript.exe shutdown.vbs. Optionally, you can just use the whole path to the script in the scheduled task, i.e. cscript.exe c:\scripts\shutdown.vbs
Main Topics
Browse All Topics





by: SheharyaarSaahilPosted on 2005-01-31 at 11:26:32ID: 13185709
Hello atkfrg56 =)
noframes/f aqget.asp# autologoff
Q: How can I auto logoff or automatically log a user out of Windows after a period of inactivity?
A: This can be done in Windows 2000 / XP / .NET using Group Policy. Control Panel, Administrative Tools > local security policy > local policies \ security options \ "Automatically log off users" and/or "Amount of idle time required before disconnecting session"
ref >> http://securityadmin.info/