Jump to content

Recommended Posts

Posted

Hello,

 

I am looking for a way to automatically logout students after 30 minutes of computer use, preferably with a given warning and a timer to show how long the student has left.

 

Its a pretty daft idea, I know, but ive got to do what im told. :rolleyes:

 

Thanks in advance!

Posted

Thanks for the suggestion, I was looking for something that would automatically log the student off 30 minutes after they have logged in, for instance, when there was 5 minutes left a popup would come up saying that they have 5 minutes remaining and to save any work.

 

Its along the same idea as they use in internet cafes and such. Basically they want to implement it to keep rotation going on people using computers.

 

Ill have to have a read into the 2003 Winexit, from what ive seen from a brief skim through it seems its only the screensaver coming on that logs the user off, I appreciate your suggestion though, thanks :)

Posted
How about automating a shutdown/reboot in 30 mins from the logon script - will give you an uncancellable countdown and a dialogue box. Be prepared for much screaming when it gets to 0 and they haven't saved their work though!
Posted
On the same sort of lines. Is there anyway of centrally shutting down machines if they are not used within 30 mins or so? (providing they are logged off)
Posted
How about automating a shutdown/reboot in 30 mins from the logon script - will give you an uncancellable countdown and a dialogue box. Be prepared for much screaming when it gets to 0 and they haven't saved their work though!

 

Ill have to run that past my network manager, thanks for the suggestion!

Posted (edited)
On the same sort of lines. Is there anyway of centrally shutting down machines if they are not used within 30 mins or so? (providing they are logged off)

 

Task Sheduler can be configured to run a task if the computer is idle for more then a given amount of time. You can creat tasks via a commands line (use something like PSEXEC to apply them on remote machines).

 

EDIT: Actualy you don't need PSEXEC. The Schtaskc command can work remotely.

Edited by K.C.Leblanc
Posted
How about automating a shutdown/reboot in 30 mins from the logon script - will give you an uncancellable countdown and a dialogue box. Be prepared for much screaming when it gets to 0 and they haven't saved their work though!

 

Yep it think that is the way forward. All you do is have the script set the time to countdown and at the bottom have a logoff command so once its counting has done it will boot the user off. You can also get it to tell them how many seconds they have left.

 

But the problem is what about when you don’t want them to have 30 minutes what if you want it to be longer? Do you want something you can just turn off and on?

Posted

shutdown /a

 

Will abort a pending shutdown like the one you describe, you could use psexec or something to send out the command to disable the pending shutdown for the required users.

Posted (edited)

you could use a function something like the link below to count down 25 minutes and execute a hta :

 

View Code Snippet

 

The hta would then have a timer of 5 mins that would display the 5 minute countdown and then use wmi to do a force log off once the timer has counted down the 5 mins.

 

Just a thought :)

 

Forcing User Logoff

Const x = 4 'This can be changed to one of the following:
'0 = Logoff
'1 = Shutdown
'2 = Reboot
'4 = Forced Logoff
'5 = Forced Shutdown
'6 = Forced Reboot
'8 = Power Off Computer
'12 = Forced Power Off

strComputer = "." 'This can be changed for remote machines
strNamespace = "\root\cimv2" 'This can be changed for namespaces

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
& strComputer & strNamespace)
Set colOperatingSystems = objWMIService.ExecQuery _
("SELECT * FROM Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(x)
Next

 

the above code is near the end of this page :

 

http://www.2000trainers.com/windows-scripting/vbscript-windows-scripting-wmi/

Edited by gecko
  • 2 years later...
Posted (edited)
On the same sort of lines. Is there anyway of centrally shutting down machines if they are not used within 30 mins or so? (providing they are logged off)
Sorry to bring up an old thread, but I found it while searching and was thinking about this. I have a vbscript that lets you remotely shutdown computers in an OU or by an IP range if not logged onto, but you just schedule it to run at a specific time and it wouldn't know if they are idle or not for 30 minutes... just whether they are logged in or not at that specific time the script is run.

Couldn't you run winexit.scr or SS Ops or another screensaver as the DEFAULT profile so it runs when no one is logged on and then configure it to shutdown? The only downside is that if anyone's first logon is on that machine it would pull those Default user settings over to their account, so you'd want to change their screen saver settings.

Edited by Seker

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...