Logging Users Off and Time Outs SIMS
Hi
I read below that there are some ways of Booting users out of SIMS for patches and stuff..
We have SIMS installed on around 40 PC's in diffrent buildings around the site...
So the shotgun by the door isn't going to work :-)...
Also the users leave SIMS logged on.. all day and all night...
Is there a way of seeing who's on and what PC and booting them off ? ?
Also is there a time out for SIMS if the user leave a classroom with it logged on ?
Re: Logging Users Off and Time Outs SIMS
If only! I think what's needed is some kind of webcam monitoring system which detects the user at logon and then auto logs off when that user is no longer appearing on the webcam for more than a few seconds. Other than that, some kind of physical token which has to be inserted in the computer....
OK, here's a thought...
1 - Get a cheapo USB key and put a file onto it which is recognizable. If you wanted to be posh, maybe you could make an MD5 hash of the users name combined with the volume name of the USB drive.
2 - Write an AutoIt script which checks for the presence of the file in the USB drive. (and verifies it if you went down the MD5 route)
3 - If the file is present, it launches SIMS.
4 - Using the AdLib function, the script can check for the presence of the file every 5 seconds or whatever.
5 - When the file is no longer present, the script can kill SIMS and/or log the user off.
Penalties for lost USB keys must be high for this to work however.
If this sounds like a workable system, then I might have a go at writing it...
EDIT: It occurs that this idea could be for the entire logon session...
Re: Logging Users Off and Time Outs SIMS
Quote:
Originally Posted by ajbritton
If only! I think what's needed is some kind of webcam monitoring system which detects the user at logon and then auto logs off when that user is no longer appearing on the webcam for more than a few seconds. Other than that, some kind of physical token which has to be inserted in the computer....
OK, here's a thought...
1 - Get a cheapo USB key and put a file onto it which is recognizable. If you wanted to be posh, maybe you could make an MD5 hash of the users name combined with the volume name of the USB drive.
2 - Write an AutoIt script which checks for the presence of the file in the USB drive. (and verifies it if you went down the MD5 route)
3 - If the file is present, it launches SIMS.
4 - Using the AdLib function, the script can check for the presence of the file every 5 seconds or whatever.
5 - When the file is no longer present, the script can kill SIMS and/or log the user off.
Penalties for lost USB keys must be high for this to work however.
If this sounds like a workable system, then I might have a go at writing it...
EDIT: It occurs that this idea could be for the entire logon session...
Rightttttt ...... So the shotgun it is then :wink:
Re: Logging Users Off and Time Outs SIMS
As Mr Britton says the situation is really bad. Version 7 programs i.e. (those accessed through the main SIMS.net GUI) only connect when they need to upload/download data. Therefore it's not possible to see if a SIMS session is still continuing or has finished. There session flags in the DB but their not visible with the availible tools.
The new version of System Manager was meant to add the ability to see who is on line. Unfortunately the release has delyed yet again to December. There is vague mention of "security enhancements" to be included.
One approach discussed on the support.net forum is to use an innocus generic patch which will of course scream if any one is still on. You can then use the list to pay a visit to the appropriate micreants.
As well any technological fix such as AJ's above, you also have to get SMT to impress on other colleagues that SIMS is maintained and kept upto date.
The October Main release, which was made availible on Wednesday, includes important new functionality for PLASC and Assessment Manager.
Either they want SIMS to work properly or they don't.
Re: Logging Users Off and Time Outs SIMS
Quote:
Originally Posted by Grommit
Rightttttt ...... So the shotgun it is then :wink:
ROFLMAO :lol:
Re: Logging Users Off and Time Outs SIMS
I wrote a script a while ago to scan a list of machines to see if a sims process was running. That combined with pskill would be good.
I assume thigs have changed though and just looking for the launcher is not sufficient enough anymore?
Re: Logging Users Off and Time Outs SIMS
You can actually find out who is logged on right now by using System Manager (i think) but it shows who sims think is still logged on ie the flag in the db hasnt be cleared yet (which it doesnt alway even if the user has closed sims). Any who heres how you do it, in System Manager bring up the user list, now click on the print icon and export it to a csv file. You will notice in there is a Logged_on column at the end.
Re: Logging Users Off and Time Outs SIMS
Quote:
Originally Posted by ChrisH
I wrote a script a while ago to scan a list of machines to see if a sims process was running. That combined with pskill would be good.
Doh! Why didn't I think of that.
Quote:
I assume thigs have changed though and just looking for the launcher is not sufficient enough anymore?
Launcher! You have been away while. Welcome to the 21st centrury Mr. Powers
Re: Logging Users Off and Time Outs SIMS
Quote:
Originally Posted by ChrisH
I wrote a script a while ago to scan a list of machines to see if a sims process was running. That combined with pskill would be good.
You wouldnt happen to have it still somewhere do you? Im rubbish at wmi programming but i can hack one from a template :)
Re: Logging Users Off and Time Outs SIMS
Announce the patch window well in advance, then run a script that forces a workstation reboot in 10 mins and then disables every domain account but yours? Bonus points for using setacl on the sims share so local users can't mess about.
That way they can't get back in until you let them.
Re: Logging Users Off and Time Outs SIMS
When I said launcher I meant pulsar or whatever program it is ;)
I will look for the script but it is hiding at the moment. I know I posted on our county board as well but I cant find it on there either I shall keep looking.
Re: Logging Users Off and Time Outs SIMS
Ok I found it:
Has a nice reporting interface as well by the look of it ;) .
I generated the workstation.txt every run by doing a net view > workstation.txt then cleaning it up in an editor. Quick and easy.
I havent tried it lately but should work ok. But havent tried since Jan 05 :P
Will check what ever process you specify. Only big problem is if a machine has suddenly gone offline in the meantime it spends a while timing out on it.
Code:
'This script queries all the machines listed in machines.txt and finds if
'The process is input to teh textbox
'Primarily written to check if SIMS.net is running by looking for Pulsar.exe
'Author Chris Hindmarch Fishermore High School
'********************************************************************
'**********USE AT YOUR OWN RISK.*************************************
'**********USE AT YOUR OWN RISK.*************************************
'**********USE AT YOUR OWN RISK.*************************************
'********************************************************************
'Start Constant Declaration
Const For_Reading = 1
Const ForAppending = 8
Const Machine_List = "workstation.txt"'The text file that the machines are read from
On error resume next
'Start Variable declaration
Dim ArrMachineList() 'Holds the machine names
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Set ObjExplorer = CreateObject("InternetExplorer.Application")
SearchProcess = ""
StrComputer = ""
InputFile = ""
StrTemp = ""
i = 0
SearchProcess = InputBox ("Enter the process to search for" & VBCrlf & "Eg winword.exe"," Enter the process name")
Redim Preserve ArrMachineList(i)
Set InputFile = ObjFSO.OpenTextFile(Machine_List, For_Reading)
Do while InputFile.AtEndOfStream <> True
StrTemp = InputFile.ReadLine
ArrMachineList(i) = StrTemp
i = i + 1
Redim Preserve ArrMachineList(i)
Loop
i = 0
'*************************************************
ObjExplorer.Navigate "about:blank"
ObjExplorer.ToolBar = 0
ObjExplorer.StatusBar = 0
ObjExplorer.Width = 800
ObjExplorer.Height = 600
ObjExplorer.Left = 0
ObjExplorer.Top = 0
ObjExplorer.Visible = 1
Do While (ObjExplorer.Busy)
Loop
Set ObjDocument = ObjExplorer.Document
ObjDocument.Open
ObjDocument.Writeln "<html><head><title>Process Status</title></head>"
ObjDocument.Writeln "<body bgcolor='white'>"
ObjDocument.Writeln "<h1>Retrieving Process information. Please wait.......</h1>"
ObjDocument.Writeln "
Currently searching for " & Search_Process & "</p>"
ObjDocument.Writeln "<table width='100%'>"
ObjDocument.Writeln "<tr>"
ObjDocument.Writeln "<td width='30%'>Station Name </td>"
ObjDocument.Writeln "<td width='70%'>[b]Machine Status/Process Status[b]</td>"
ObjDocument.Writeln "</tr>"
'*************************************************
For i = Lbound(ArrMachineList) to UBound(ArrMachineList) -1
StrComputer = ArrMachineList(i)
Set ObjWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
If Err.Number <> 0 Then
ObjDocument.Writeln "<tr>"
ObjDocument.Writeln "<td width='30%'>" & StrComputer & "</td>"
ObjDocument.Writeln "<td width='70%'>" & Err.Description & "</td>"
ObjDocument.Writeln "</tr>"
Err.Clear
Else
Set ColProcesses = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = '"& SearchProcess &"' ")
If ColProcesses.Count = 0 Then
'Write to file stus active
ObjDocument.Writeln "<tr>"
ObjDocument.Writeln "<td width='30%'>" & StrComputer & "</td>"
ObjDocument.Writeln "<td width='70%'>" & "Application Inactive" & "</td>"
ObjDocument.Writeln "</tr>"
Else
ObjDocument.Writeln "<tr>"
ObjDocument.Writeln "<td width='30%'>" & StrComputer & "</td>"
ObjDocument.Writeln "<td width='70%'>" & "Application active" & "</td>"
ObjDocument.Writeln "</tr>"
End If
End If
Next ' For i = Lbound
ObjDocument.Writeln "</table>"
ObjDocument.Writeln "
All Machines in the list processed"
ObjDocument.Writeln "</body></html>"
Wscript.Sleep 4000
ObjDocument.Close
'ObjExplorer.Quit
Re: Logging Users Off and Time Outs SIMS
Nice one, will have a look at it more closely later but at first glance it looks like it just spiders of and finds compy's running sims. It doesnt detect sims that has been idle for x period of time.. does it?
Re: Logging Users Off and Time Outs SIMS
No just a simple process detection.
Re: Logging Users Off and Time Outs SIMS
You could perhaps check cpu usage of the sims process though if you wanted to get fancy.