Tracking Flash Drive Users
I recently received an e-mail from Sam J. with a question about flash drives:
Is their any way to record the user name of every person who has used your flash drive?
While there is no fool proof way of doing it, you could try a combination of autorun.inf files and batch file.
Create an autorun.inf file on the root of your flash drive with the following contents:
[autorun]
open=getusers.bat
action=Open folder to view files
Next, create a batch file called getusers.bat with the following contents:
@echo offecho %username%>>users.txt
When a user puts your flash drive into their computer, it pop up with an autoplay option indicating that they are to click on the icon to open the folder to view files. A small black box will pop up briefly and then disappear. If you go into the root of the drive, you will find a new file called users.txt. If you open this file, it wil contain the user names of all the users who have accessed your drive by clicking on the icon.
This is, of course, not a fool proof method as all someone has to do is bypass the autoplay feature and their name is not recorded or they can delete the users.txt file but this is at least a proof of concept.
10 Responses to “Tracking Flash Drive Users”
-
Shoban Says:
November 10th, 2008 at 8:33 pmThanks for the tip Tim.. Its really sad to see that you are not updating the blog regularly! Hope you will start soon
. BTW is there any way to autorun a remote file. Forexample. can I use autorun.inf file to run a web page eg: http://www.xyz.com/test.php?Thanks
Shoban -
Frick Says:
November 10th, 2008 at 8:35 pmSlick, thanks for the tip
-
Stunn Says:
November 11th, 2008 at 1:56 amNeat. I would suggest adding:
“start ..”
(without quotes) to the batch file, so that the folder is opened as the user expected.
-
Alberto MH Says:
November 11th, 2008 at 2:56 amyou can change the getusers.bat with this new lines.
@echo off
echo %username%>>users.txt
date /t>>users.txt
time /t>>users.txtthen you will now the day and hour.
-
Keiran230 Says:
November 11th, 2008 at 9:56 ammaking that batch say:
@echo off
echo %username%>>Other\users.txt
start “Explorer” %SystemRoot%\explorer.exe “%:\”
will make the trick look less suspicious -
sam j. Says:
November 14th, 2008 at 7:33 pmthanks for replying to my e-mail i sent to you guys
=) -
Mike Says:
November 16th, 2008 at 3:12 pmis there a way of running this along side the dcot menu system?
so i have something like
open=menu.exe
open=getusers.bat -
BeNg Says:
November 19th, 2008 at 3:45 pmy does the .bat have to be labled getusers??? shouldn’t it work with another name as long as it is “open=anothername” in the autorun.inf
-
BeNg Says:
November 19th, 2008 at 3:56 pmis there anyway that you can get the drive to email you the user name every time someone plugs it in
THX
BeNgPS I think u are really cool and i want to become like u when i grow up
-
Mike Says:
November 22nd, 2008 at 4:48 pmBenG…..it doesnt necesarily have to be called getusers.bat it can be called whatever you want it to be aslong as the autorun file points to it….what i wanted to know was there a wasy of runnign this alongside the usb drive menu system by using a structure like
[autorun]
open=DcoTmenu.exe
open=getusers.batbut this way doesn’t work, i have found out that i should point my autorun file to open getusers.bat and within the file run the menu system so structure would be:
[autorun]
open=getusers.bat
icon=DCoTmenu.exe[getusers.bat]
@echo off
echo %username%>>users.txt
start DcotMenu.exe
