Forcing User Logoff in Win XP after specified amount of time..

Discussion in 'Windows Operating Systems' started by pavlos, Aug 11, 2002.

  1. pavlos

    pavlos Member

    Joined:
    Jan 25, 2002
    Messages:
    433
    Location:
    Melbourne
    Very basic question, but I just can't be bothered spending time looking for where the setting is :p I think its in the Group Policy editor :confused:

    Anyway, I have set up an account you would call a 'Guest' account but is restricted in about 1000 ways than you would normally expect, and to add to this, I want the system to FORCE the user to logoff 15 minutes after they logon, and not be able to logon again for another hour.

    Also, is it possible to display a message on the users screen when they have 5 minutes left, saying 'You have 5 minutes left for this session.' and then again when they have 1 minute left 'You have 1 minute left for this session.'

    thx. :D
     
  2. OP
    OP
    pavlos

    pavlos Member

    Joined:
    Jan 25, 2002
    Messages:
    433
    Location:
    Melbourne
    I'd also like it if someone could tell me how to initiate a remote shutdown from another computer on my network (when I log into the other computer as Administrator.)

    thx again. :D
     
  3. driver

    driver Member

    Joined:
    Jun 28, 2001
    Messages:
    3,583
    Location:
    Brisbane
    You can do remote shutdown by using one of 10,000 NT utilities. Just google for it.
     
  4. OP
    OP
    pavlos

    pavlos Member

    Joined:
    Jan 25, 2002
    Messages:
    433
    Location:
    Melbourne
    Nahh dont wanna use any more third party software :(

    I thought Windows XP and 2000 (and NT?) had this capability built into them?
     
  5. driver

    driver Member

    Joined:
    Jun 28, 2001
    Messages:
    3,583
    Location:
    Brisbane
    You can shutdown the local system without any utilities using RunDLL32 etc, but as far as i know, you need an extra utility to do it for remote machines.

    There is a heap of command line utilities to do it. There like tiny as and just a single file.

    eg x:\>shutdown \\YourPC
     
  6. gords

    gords Oh deer!

    Joined:
    Aug 3, 2001
    Messages:
    6,645
    Location:
    Sydney, Australia
    1) There is no group policy that allows you to set automated logoffs. The way I got around it was through a program that D_Web wrote for me. Basically, it is a screensaver that logs the user off. You install it as a normal screensaver (which you can, of course, lock down with a group policy) and specify the amount of idle time before the user is logged off. I asked D_Web to write it so that it forces the logoff (which means that if they have unsaved work, it will be lost). It works wonderfully - many thanks to him for his time and effort. Contact him if you want further info on the program.

    2) The easiest way to do this is using the shutdown.exe tool that (I think) ships with 2k and XP. Anyway, it's the one written by Microsoft. It allows you to specify what machine you want shut down, whether you want it to reboot it after shutdown and that sort of thing. It's a command-line utility. As driver said, there are heaps of programs out there that will do this and much more. Let me know if you want further information on the MS utility though - I've got a link to the TechNet page at work.
     
  7. OP
    OP
    pavlos

    pavlos Member

    Joined:
    Jan 25, 2002
    Messages:
    433
    Location:
    Melbourne
    i would have made something similar, but i want win xp to log off 15mins after the user logs on, regardless of if the computer is idle or not ;)

    just tried out the shutdown.exe tool, works sweet, thx guys :)
     
  8. OP
    OP
    pavlos

    pavlos Member

    Joined:
    Jan 25, 2002
    Messages:
    433
    Location:
    Melbourne
    actually, i just thought of something, couldnt i put "shutdown.exe -l -f" as a scheduled task in the specific user account, which would therefore force a logoff?
     
  9. gords

    gords Oh deer!

    Joined:
    Aug 3, 2001
    Messages:
    6,645
    Location:
    Sydney, Australia
    You want the user to be logged off x minutes after they've logged on, right? If you put an entry in the scheduled tasks, you'll only be able to make that event happen at a specific time (eg. 11:00 PM), not a certain amount of time after the user has logged on.

    Could you possibly make a program that incorporates a timer which counts out number of minutes you want (for example, 15) and then executes the command you specify (shutdown.exe -l -f)?
     
  10. D_Web

    D_Web Member

    Joined:
    Jul 9, 2001
    Messages:
    1,538
    Location:
    Gold Coast, Sunny Qld
    Writing something to do that would be simple, you could get it to run on startup with a registry entry and it could warn the user how long they have left etc.

    The problem could be in disabling the user's account for 1hour, though.
     

Share This Page

Advertisement: