Question

Locked

Force Logoff after being logged-on for a specified time

By mike ·
Anyone know how to - Force logoff after a specified number of minutes (not using Windows Steady State)
This is not about a specified time window for logon usage!(can be done in GP)

Seems a reasonable thing to do in Schools so people don't hogg the pc. But seems somehow difficult to achieve.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Answers

Collapse -

Could you elaborate?

by Peconet Tietokoneet In reply to Force Logoff after being ...

You say "Force Logoff after being logged-on for a specified time".
And then say "This is not about a specified time window for logon usage".

If you can be more specific, it would be more helpful to us and you..

Collapse -

here's a MS Help and Support Article

by CG IT In reply to Force Logoff after being ...
Collapse -

Not really sure what you are after but

by Jacky Howe In reply to Force Logoff after being ...

There is a built in logoff.exe in XP and it can be used with a timer in a script that could be called at logon. There is no warning and the user is automatically logged of when the time is up.

Copy and past the information between ------- into notepad and save it with a .vbs extension.

-------------
Set oWshShell = WScript.CreateObject("WScript.Shell")
sCommand = "logoff.exe"

WScript.Sleep 9000 'Timer is adjusted to suit your needs

oWshShell.Run(sCommand)

-------------

Collapse -

Automatic Loggoff

by mike In reply to Not really sure what you ...

Thanks Jacky - I'll try the script.I can always include a warning of the time allowed in the logon message. But a warning at "times up" would be nice.

To elaborate I want to be able to force user log-off after a time period of being logged -on for say, 1 hour, We have students that need to share the PC with others so I want a program to
(1) remind them that the system is going to log them off and that they should save their work. and
(2) then logs them off. and blocks them from logging on again for a time perdiod (say 30 min)

This will allow others who are waiting to have a turn. So the should time start when the user logs-on and then warn them say 5 min. 4,3,2,1 before it forcebly logs them off after the set time ( say 1 hour)

I know it is possiible in AD and GP to give users a "Time Widow" - a time period during
which they are allowed to log-on - but that's not the same thing.

many thanks
Mike

Collapse -

Have alook at "ComputerTime"....

by Peconet Tietokoneet In reply to Automatic Loggoff

http://www.softwaretime.com/

It sounds like what you are looking for.

Collapse -

Ok

by Jacky Howe In reply to Automatic Loggoff

I can do the warning and a timeout period but you would have to use Active Directory to lock the users out.

Set oWshShell = WScript.CreateObject("WScript.Shell")
sCommand = "logoff.exe"

WScript.Sleep 3600000 'Timer is adjusted to suit your needs

hello = msgbox("You will be Automatically logged off in 2 minutes please save your Work.")

WScript.Sleep 150000

oWshShell.Run(sCommand)

Collapse -

Mike

by Jacky Howe In reply to Automatic Loggoff

You would probably do better to copy the script to the workstations and copy a shortcut to start it and place the shortcut in:

C:\Documents and Settings\All Users\Start Menu\Programs\Startup

Edit: to add

or after you copy it to the workstation you can modify the Registry to run it.

Click Start, Run type in regedt32 and press Enter.

Navigate to "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"

In the right hand pane right click and add a new String value AutoLog, give it a Value of C:\script name.vbs

Back to Windows Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums