+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 29
Windows Thread, Record Logon in Technical; Hi, Looking for someway of loggin who's logged on where. I have tried the following logon script: echo %DATE% %TIME% ...
  1. #1

    Join Date
    Apr 2007
    Location
    York
    Posts
    558
    Thank Post
    10
    Thanked 4 Times in 4 Posts
    Rep Power
    19

    Record Logon

    Hi,

    Looking for someway of loggin who's logged on where. I have tried the following logon script:

    echo %DATE% %TIME% %USERNAME% %COMPUTERNAME% >> 2003server\netlogon\logs\%USERNAME%.txt

    echo %DATE% %TIME% %USERNAME% %COMPUTERNAME% >> 2003server\netlogon\logs\%COMPUTERNAME%.txt

    It doesn't seem to work at the moment. I have given staff and pupils full control over the "logs" folder.

    Thanks

  2. #2
    BatchFile's Avatar
    Join Date
    Aug 2007
    Location
    Cumbria
    Posts
    948
    Thank Post
    544
    Thanked 128 Times in 106 Posts
    Rep Power
    60
    I use 2 bats:

    First, fired from the login script:
    call \\argus\whoswhere2\getinfo.bat >> \\argus\whoswhere2\loginlog.txt

    Second, getinfo.bat fired from above:
    @echo off

    echo ******************************

    echo %computername%
    date /t
    time /t
    echo %username%



    Works ok here, just remember to empty loginlog.txt each term!

  3. #3


    Join Date
    Jul 2007
    Location
    Rural heck
    Posts
    2,662
    Thank Post
    120
    Thanked 434 Times in 353 Posts
    Rep Power
    126
    I wouldn't use the netlogon folder, create your own shared folder for the purpose (maybe two one for users, one for computers). Bare in mind students will need write access to the folder (make it a hidden share using $ at the end of the sharename).

    Also you're missing the \\ from the UNC path. It might even require a mapped drive, I'm not sure.

  4. #4
    tosh74's Avatar
    Join Date
    Dec 2006
    Location
    Scotland
    Posts
    136
    Thank Post
    27
    Thanked 43 Times in 27 Posts
    Rep Power
    23
    Just update the \\server\share$ part and assign logon and logoff trackers as logon / logoff users scripts
    Attached Files Attached Files

  5. 11 Thanks to tosh74:

    actech (15th June 2009), bugginmiami (23rd April 2009), Diello (24th March 2009), garethedmondson (23rd March 2009), marco84 (23rd March 2009), mb2k01 (23rd March 2009), RTi (22nd September 2009), ssiruuk2 (23rd March 2009), tazz (27th July 2009), TwoZeroAlpha (23rd March 2009), _Jo_ (30th April 2009)

  6. #5
    IanT's Avatar
    Join Date
    Aug 2008
    Location
    @ the back of my server racks farting.....
    Posts
    1,891
    Thank Post
    2
    Thanked 118 Times in 109 Posts
    Rep Power
    60
    wicked!

    it works!

  7. #6

    Join Date
    Apr 2007
    Location
    York
    Posts
    558
    Thank Post
    10
    Thanked 4 Times in 4 Posts
    Rep Power
    19
    Tosh74, thanks for the scripts. Changed and updated for our server.
    Can I just call them from the logon batch file directly to the .vbs? Is there a way for it to run in silent mode?

  8. #7

    Join Date
    Apr 2007
    Location
    York
    Posts
    558
    Thank Post
    10
    Thanked 4 Times in 4 Posts
    Rep Power
    19
    Bonus !! Got it working.

  9. #8
    IanT's Avatar
    Join Date
    Aug 2008
    Location
    @ the back of my server racks farting.....
    Posts
    1,891
    Thank Post
    2
    Thanked 118 Times in 109 Posts
    Rep Power
    60
    hold up, got it working for admins.................log on as a teacher or student and I get a lovely VB - Permission Denied error but it still logs the logon times etc

  10. #9

    Join Date
    Apr 2007
    Location
    York
    Posts
    558
    Thank Post
    10
    Thanked 4 Times in 4 Posts
    Rep Power
    19
    Give staff and pupils full control over the particular share

  11. #10

    Join Date
    Apr 2007
    Location
    York
    Posts
    558
    Thank Post
    10
    Thanked 4 Times in 4 Posts
    Rep Power
    19
    Quick question.
    I have the logon one working fine by calling the script from the logon batch file.
    How does the logoff one work? Do you have to add it to logoff script in GP ?

  12. #11
    tosh74's Avatar
    Join Date
    Dec 2006
    Location
    Scotland
    Posts
    136
    Thank Post
    27
    Thanked 43 Times in 27 Posts
    Rep Power
    23
    sorry for the late reply.
    I run the logon / logoff tracker scripts via AD GPO for staff and students. USER CONFIG/WINDOWS SETTINGS/SCRIPTS (Logon/Logoff). Logontracker assigned to logon and logoftracker assigned to Logoff. I tend to run my scripts hiddden USER CONFIG/WINDOWS SETTINGS/ADMIN TEMPLATES/SYSTEM/SCRIPTS/RUN LEGACY LOGON SCRIPTS HIDDEN.

    My log files are on a hidden share on a server. Users have Change and READ permissions to the share itself and have full permissions (with the exception of Full Control and Modify) to the shared folder. I have to create the COMPUTERS and USERS subfolders before the script runs correctly.

    Hope this helps you out.
    Last edited by tosh74; 20th January 2009 at 09:41 AM.

  13. 2 Thanks to tosh74:

    Alis_Klar (17th May 2010), garethedmondson (23rd March 2009)

  14. #12

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,957
    Thank Post
    886
    Thanked 1,700 Times in 1,477 Posts
    Blog Entries
    12
    Rep Power
    448
    Quote Originally Posted by tosh74 View Post
    Just update the \\server\share$ part and assign logon and logoff trackers as logon / logoff users scripts
    Been using this for a while its excellent.

  15. #13
    Pottsey's Avatar
    Join Date
    Apr 2006
    Location
    Nottinghamsire
    Posts
    759
    Thank Post
    3
    Thanked 52 Times in 42 Posts
    Rep Power
    30
    Those scripts from Tosh look perfect for what we need but I cannot get them working. It says line 23, char2, error path not found, code 800A003C.

  16. #14
    tosh74's Avatar
    Join Date
    Dec 2006
    Location
    Scotland
    Posts
    136
    Thank Post
    27
    Thanked 43 Times in 27 Posts
    Rep Power
    23
    Quote Originally Posted by Pottsey View Post
    Those scripts from Tosh look perfect for what we need but I cannot get them working. It says line 23, char2, error path not found, code 800A003C.
    Have you created a COMPUTERS and USERS folder under your server share ?

    \\server\losg$\Computers
    \\server\logs$\Users

  17. #15
    Pottsey's Avatar
    Join Date
    Apr 2006
    Location
    Nottinghamsire
    Posts
    759
    Thank Post
    3
    Thanked 52 Times in 42 Posts
    Rep Power
    30
    Yes, currently have

    strUserDirectory = "\\Hp-server\Log_Logs$\Users"
    strCompDirectory = "\\Hp-server\Log_Logs$\Computers"

    Just tripled checked the permissions and tried other folders. As usefull as they are I sometimes hate scripts.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. A record day
    By Dos_Box in forum General EduGeek News/Announcements
    Replies: 11
    Last Post: 25th January 2006, 01:04 PM

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
  •