Windows XP automatic logoff

Discussion in 'Software' started by mazdak, May 8, 2006.

  1. mazdak

    mazdak Private E-2

    Hello.

    I was wondering if there is anyway to limit a user's time from Windows XP.

    For example, if we had user1, is there any to allow him to only be logged on for one hour. We don't have a server, so time restrictions in that manner are out of the question, and we want the users to be able to log on at any time of the day, but only for an hour a day.

    The operating system we are trying to accomplish this on is Windows XP Pro with Service Pack 2. Any help you can offer would be appericated.
     
  2. Mada_Milty

    Mada_Milty MajorGeek

    Code:
    option explicit
    
    dim o_shell
    
    set o_shell = WScript.CreateObject ("WScript.Shell")
    
    WScript.Sleep 3600000
    
    o_shell.run ("shutdown -s")
    
    Wscript.Quit()
    If you were to copy this text into notepad, and save as filename.vbs, you would have a logon script that would automatically shut down the computer after 1 hour. To set this as a logon script, please do the following:

    1. Hit windows key + r (or click start --> run)
    2. Type 'gpedit.msc' (without the quotes)
    3. Press enter (or click ok)
    4. Under 'User Configuration' expand 'Windows Settings'
    5. Select 'Scripts (logon/logoff)
    6. Right-click 'Logon' in the right hand pane, and select 'Properties'
    7. Press the 'Add' button

    From there, navigate to your newly created script, and PRESTO! You have a logon script that waits an hour, and then shuts down the computer after giving the user a 30 second warning. There are more options available to you, I recommend that you type 'shutdown /?' at a command prompt for more details.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds