Title: Message
Here it is .......
 
You will also need a batch file named datetime.bat that I did not write.  It is below this batch place it in the same directory as the LOGON.CMD.  I have over 400 users in this domain that I run this on and the whole log file is less than 130K for 1 month.  Very simple and can pull into Excel for quick checks.  Hope this helps.   - Joe S.
 
---------------------- Start Cut Here for LOGON.CMD ------------------------------------------
@echo off 
 ::call  datetime.bat to set date variables
 call %logonserver%\NETLOGON\Scripts\datetime

 ::is machine NT4 or W2K (I do this just to know) 
 if exist "%SystemDrive%\Documents and Settings" goto W2K
 goto NT4
 
:W2K
 
 Set VERSION=W2K
 goto CONTINUE
 
:NT4
 Set VERSION=NT4
 goto CONTINUE
 
:CONTINUE
 :: EX: DateLogon,timelogon,MachineName,Username,Logonserver,OS
 :: Output: 04/05/2002,4:32p,JDOE_W2K,JMDoe,\\Server,NT4
 :: write the following line in comma delimted format 
 echo %vdate%,%vtime%,%COMPUTERNAME%,%USERNAME%,%LOGONSERVER%,%VERSION%>>\\server\logonuser\login.txt
 

 goto End
 
:End
 
------------------------  End Cut Here for LOGON.CMD ---------------------------------------
 
 
----------------------  Start cut here for DATETIME.BAT --------------------------------------
 
:: __________________________________________________________________
::
::  Batch File:      DATETIME.BAT
::  Author:          Frank-Peter Schultze
::
::  Updates:         http://www.fpschultze.de/b6.htm
::  Enhancement Req.
::  And Bug Reports: [EMAIL PROTECTED]
::
::  Built/Tested On: MS-DOS 6.22, Windows 98 SE, Windows NT 4.0
::  Requirements:    OS: MS-DOS 5+, Windows NT4+
::
::  Purpose:         Set DATE/TIME Variable To The System Date/Time.
::
::  Syntax:          No arguments required.
::
::  State Changes:   Reduces free environment space.
::
::  Assumptions And
::  Limitations:     * Does not handle low environment errors.
::
::  Last Update:     2001-12-01
:: __________________________________________________________________
::
   @Echo Off
    If Not %1'==/?' Goto Begin
    Echo Sets DATE and TIME variable to the system date and time.
    Echo.
    Echo [Call] DATETIME
    Goto End
   :Begin
    For %%V In (vDATE vTIME) Do Set %%V=
    If %OS%'==Windows_NT' Goto %OS%
    Echo Exit | %COMSPEC% /K Prompt If %%%%3'==' %%%%0 $D $T$_Set vDATE=%%%%2$_Set vTIME=%%%%3$_:>%TEMP%.\$ATETIME.BAT
    For %%C In (Call Del) Do %%C %TEMP%.\$ATETIME.BAT
    Goto End
   :Windows_NT
    For /F "Tokens=2" %%D In ('Date /T') Do (Set vDATE=%%D)
    For /F            %%T In ('Time /T') Do (Set vTIME=%%T)
   :End
 
---------------------- End cut here for DATETIME.BAT --------------------------------------
 
-----Original Message-----
From: Henrique Duarte [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 4:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [ActiveDir] tracking users logon to AD

Joe,
 
thanks for the info.  Do you have a sample script you could post?
 
Thanks,
 
-Henrique
----- Original Message -----
Sent: Wednesday, April 03, 2002 8:06 PM
Subject: RE: [ActiveDir] tracking users logon to AD

I have not tried this with tracking logins, but I am sure it will work.  I have done it when applying reg hacks etc. via batch.  Just create a script that runs at logon and logoff that writes to a txt file on a server somewhere.  You can even put in the time and date etc.  Works great for me when I want to know who ran what at what time. 
 
-JS
-----Original Message-----
From: Henrique Duarte [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 6:23 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] tracking users logon to AD

Hello,
 
Does anyone know how to track user's login/logout/session timeout activity within a Win 2000 Domain?  I know it's possible through group policy but there is a lot of irrelevant information that I would have to filter, and as far as I know I cannot automate the filtering in Windows.  All I  need is a sofware/solution that tells me when user "Joe Bloggs " logged in, logged out, and wether he left his desk for an extended period of time.
 
Thanks in advance,
 
-Henrique

Reply via email to