Solved

logging users what computer they login on to a text file

Posted on 2007-03-19
7
191 Views
Last Modified: 2010-04-16
I want to add something in the login batch file that will create a text file by either computer name or username that will tell me when they logged in and who is logged into that computer.  I would like to set it up for each individual user as a text file.

Does anyone know how to do this?
0
Comment
Question by:cknoderer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
7 Comments
 
LVL 22

Accepted Solution

by:
Christopher McKay earned 400 total points
ID: 18750655
What I've done to accomplish this is add this to the logon script:

echo %username% logged onto %computername% on %date% %time% >> \\<server>\<share>\%username%.txt

Hope this helps!

:o)

Bartender_1
0
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 18750688
change the items to match your environment: <server> and <share>
the items using % around them are environment variables and will change, reflecting the users and such into the username's profile.

:o)

Bartender_1
0
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 18750701
sorry, that should be "..reflecting the users and such into the usernames's text file."
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:cknoderer
ID: 18751195
I got it working.  How would you overwrite the file so that the information is more correct?  
0
 
LVL 22

Assisted Solution

by:Christopher McKay
Christopher McKay earned 400 total points
ID: 18751308
If you want to overwrite the file, you could change the command to this:
echo %username% logged onto %computername% on %date% %time% >\\<server>\<share>\%username%.txt
0
 
LVL 74

Assisted Solution

by:Jeffrey Kane - TechSoEasy
Jeffrey Kane - TechSoEasy earned 100 total points
ID: 18751768
This data is already collected by your server, and you only need to cull the data in order to review it.  I use a 3rd party application for this, which is free in the SBS Environment. (because it's a Single Domain):
http://manageengine.adventnet.com/products/ad-manager/windows-active-directory-logon-reports.html

There may be other ways, there may be other tools, but this one works and it's free.

Jeff
TechSoEasy
0
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 18756961
Thanks for the points.

I'm glad we were able to be of some assistance. If you could spare a few minutes, could you tell me how I would have been able to help you better? (What could I have done to earn an "A" grade, rather than a "B" grade?) This will enable me to better assist others in the future.

:o)

Bartender_1
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question