• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1182
  • Last Modified:

How to capture user Log in and Log out timings in xls or word doc on a Win2k DOmaino

Hi All,

I have a Windows 2000 Server which is configured as a AD Domain Server.
In this domain I have got some groups of users who log in to the domain from a Win2k Pro desktop.

Now I want to capture log in and log out timings along with the date of a particular group of users in to a xls or doc format. How should I go about it. It should get appended in to the xls or doc file. My main aim is to find out and improve my process so that I know who works for what time and when,

Thanks & Regards
  • 3
1 Solution
Your Event viewer keeps a log of successful logons and offs. (not very pretty to look at)

The only thing I can think of is using logon and off scripts that will append the data you want to a file.

I found this sample posted by PeteLong and Spiderfix

Add this to the login script, or place it as a batch file in the users startup directory


echo %computername%>>filename.txt
echo %ClientName% >> Filename.txt            
echo %username%>>filename.txt


you can change the path to filename.txt to server share to hold the info centrally
That will automatically store the info in a txt file.
You could use excel or maybe even access to import the data and to format it to your likings. ( I am not that strong with excel)
Hope this helps
iamalpineAuthor Commented:
If I place it as a batch file in users startup directory they will be able to remove it, which I dont want. Also if we store it centrally using the same batch file they will also need access to that share.

How do I automate it for 8 users only to login the timings into a xls file and keep it centrally without them being able to access the share. How to add this script through their login script. Do I just create 8 different batch files attach them into their login scripts.

You can use the same script for all users. Either you can attatch it to the user profile (same for all)
or assign it using a GPO for the domain.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now