+ Post New Thread
Results 1 to 7 of 7
Windows Thread, List of users logged on a workstation in Technical; Anyone have any tips how I can get a list of logged on users for a particular workstation on a ...
  1. #1

    Join Date
    Jun 2007
    Location
    Barnehurst
    Posts
    157
    Thank Post
    3
    Thanked 2 Times in 2 Posts
    Rep Power
    15

    List of users logged on a workstation

    Anyone have any tips how I can get a list of logged on users for a particular workstation on a particular day??

    Much appreciated.

  2. #2
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,639
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    22

    Re: List of users logged on a workstation

    AB Tutor could do this for you.

  3. #3

    SpuffMonkey's Avatar
    Join Date
    Jul 2005
    Posts
    2,248
    Thank Post
    55
    Thanked 280 Times in 187 Posts
    Rep Power
    134

    Re: List of users logged on a workstation

    We wrote our own little application. Quite useful.

  4. #4
    sahmeepee's Avatar
    Join Date
    Oct 2005
    Location
    Greater Manchester
    Posts
    795
    Thank Post
    20
    Thanked 70 Times in 42 Posts
    Rep Power
    34

    Re: List of users logged on a workstation

    Quote Originally Posted by SpuffMonkey
    We wrote our own little application. Quite useful.
    Ditto - hard to imagine life without it now.

  5. #5


    Join Date
    Jul 2007
    Location
    Rural heck
    Posts
    2,662
    Thank Post
    120
    Thanked 434 Times in 353 Posts
    Rep Power
    126

    Re: List of users logged on a workstation

    adding

    echo %username% %time% %date% >> c:\userlog.txt

    to your logon script would do it.

  6. #6
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,988
    Thank Post
    120
    Thanked 283 Times in 261 Posts
    Rep Power
    107

    Re: List of users logged on a workstation

    Quote Originally Posted by mrforgetful
    AB Tutor could do this for you.
    I started this last week with the newer version of AB tutor. You can have a log policy that teachers cant remove. Great addition.

  7. #7
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,207
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    74

    Re: List of users logged on a workstation

    If you have office on your stations then you can use the script below it uses JET so you need access installed or you can probably install JET seperatly (not sure about that). Set it to run at logon and it puts all the info into an access Db.

    Code:
    On Error Resume Next
    
    Dim adoCn
    Dim adoRs
    Dim network
    Dim user
    Dim compname
    Dim strSQLInsert
    
    
    Set network = CreateObject("Wscript.Network")
    user = network.username
    compname = network.computername
    
    Set adoCn = CreateObject("ADODB.Connection")
    
    adoCn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=\\server\logs$\logs.mdb" 'CHANGE THIS BIT
    
    'Check the connection opened ok           
    If Err.Number <> 0 Then           
    	Call ErrHandler
    End If
    
    
    strSQLInsert = "INSERT INTO [Log On] ([date], [time], [user], compname) " & _  
    	"VALUES ('" & Date & "', '" & Time & "', '" & user & "', '" & compname & "')"
    
    adoCn.Execute strSQLInsert, , 8
    
    'Check the data was inserted OK
    If Err.Number <> 0 Then           
    	Call ErrHandler
    End If
    
    adoCn.Close
    
    Set adoCn = Nothing
    Set network = Nothing
    
    
    
    
    Sub ErrHandler()
    Dim fso, f
    
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    
    Set fso = CreateObject("Scripting.FileSystemObject")
    
    Set f = fso.OpenTextFile("\\server\logs$\" & LogError & ".txt" , ForAppending, True)
    
    f.WriteLine Date & ", " & Time & ", " & user & ", " & compname & ", " & Chr(34) & Err.Description & Chr(34)
    f.Close
    
    Set fso = nothing
    
    Err.Clear
    
    End Sub

SHARE:
+ Post New Thread

Similar Threads

  1. Moodle - Slow when more than a few users are logged in
    By wesleyw in forum Virtual Learning Platforms
    Replies: 18
    Last Post: 21st September 2007, 02:34 PM
  2. Replies: 5
    Last Post: 26th July 2007, 09:33 AM
  3. Replies: 3
    Last Post: 23rd March 2007, 09:36 AM
  4. Who logged on to workstation
    By Nij.UK in forum Windows
    Replies: 2
    Last Post: 5th June 2006, 02:49 PM
  5. Change start page for logged on users
    By ajbritton in forum Comments and Suggestions
    Replies: 7
    Last Post: 12th April 2006, 08:48 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •