E-Mail Request: USB AutoRun Without AutoPlay
Ben sent me an e-mail asking me about automatically running a program when a USB drive is inserted into a computer. Ben writes:
Hi
I really like your site. Now I finally can have fun with my USB and not just use it at work.
I was wondering if there’s any way to make the USB drive run an exe as soon as its placed in the drive? Without questions asked.
The thing is, I would like my USB to send me an e-mail as soon as someone plugged it in, with something like.
“USB used at [IP] at [TIME], computer name is [COMPUTERNAME]”
so if someone stole it and tried to use it, I would know who they are (or the police at least know)
Is that possible?
- Ben.
Well, Ben, the short answer to your question is “Not that I am aware of.” Microsoft has put the AutoPlay function to prevent people from putting viruses on USB drives and infecting people’s computers this way.
Now, if you install a small monitoring client on a computer, it could monitor the system for USB drives and if it finds the USB drive and the appropriate application, it could launch it without prompting but this would defeat the purpose of having the application run from a found USB drive.
But, let me extend this question out to the DCoT readership. Does anyone out there know how to perform this action? If so, let us know in the comments.
If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?
15 Responses to “E-Mail Request: USB AutoRun Without AutoPlay”
-
Steve Says:
December 1st, 2006 at 5:21 pmAny info on these monitoring clients or a how to build on would be greatly appreciated. I would like to avoid the autoplay features on my own machines and automatically back up my drives on insertion.
Thanks,
Steve -
Maikel Says:
December 5th, 2006 at 5:17 amHey,
i was looking around for a solution right now.
And have found a couple answers that could do what you want them too.
Take a look here:
http://www.softplatz.com/Soft/Utilities/Shell-Launchers/BusRunner-AutoRun-your-USB-Drive.htmlHope this will help!
Cheers,
Maikel.ps: a dutch reader with a ‘not that great’ english vocabulary.
-
Emanuele Says:
December 27th, 2006 at 3:21 pmHi guys,
our charity association has developed MyPendrive, a free program that enables extended autorun functions for all USB drives.MyPendrive also lets you easily customize the drive label, the icon and the context autostart menus.
MyPendrive offers also backup functions to copy the content of your USB drive and is highly customizable.
MyPendrive has a great “plus”: the exclusive “UsbAutoStart” function, that allows to perform tasks without user actions, at drive connection.
New version (that will be released about 8 Jan.) will have following features:
- start your portable apps at drive connection.
- backup your folders at drive connection.
- custom context menus for your USB drive in MyComputer.
- easy access all MyPendrive options and functions from a dedicated system tray icon and view statistics about your pendrive.Mypendrive is donationware, we higly apreciate donations that will help us in re-education of people with social deseases.
Many thanks for your kind attention!
www.mypendrive.org -
Emanuele Says:
December 27th, 2006 at 3:27 pmHi guys,
another one is MyPendrive (www.mypendrive.org) and it’s free.
First version is a little limited (is able to autorun only itself) but next version will have more and extended functions (automatic run a program, automatic backups, system tray menus and so on).
-
Wayne Says:
February 3rd, 2007 at 4:12 pmThought I share an excellent free USB application which not only addresses the Autorun issue, but also solves the dreaded shifting USB drive letter problem.
Folks can find the USBDLM app here: http://www.uwe-sieber.de/usbdlm_e.html
There is no formal installation … just copy the files to the program folder of your choice (i.e. c:\program files\USBDLM). The installation process consists of sinply running the app with the “-install” command line switch (i.e. USBDLM - install). This installs a service with is invisible but powerful. There are several CMD files shipped with the app that will allow you to start and stop the service as required.
Settings are easily configured by way of the _USBDLM.ini file. There’s a master one in the app folder or, you can place one in the USB root for individual drive control.
Additional settings for specifing persistant drive letters and autorunning of apps is also set in the INI file. Read the online help and/or the help file in the app folder for many other wonderful options.
I personally have used the app on a number of different Windows XP platforms for several months without a single glitch. And better yet, it has survived usage in environments where users know little about computers and love to click on everything. In fact, onbe of the best features of USBDLM is that there’s nothing to click on - it just works.
In my case it has allowed me to write batch files with hard-coded drive letters and use USB storage as an inexpensive backup media for non tech savy customers. Also, some of my users love having a menu (PSTART) magically auto load with menu options when they insert their USB drives.
The developer is named Uwe Sieber and he’s done a great job. Hope you enjoy this app as much as I do.
Regards,
Wayne
-
Gulagosphere Says:
April 22nd, 2007 at 1:41 amAs usb flash drives grow in size (and price) it might finally be cost effective to lo-jack them like many notebook computers. Stolen? Activate the built-in GPS. Arrest thief.
-
Zachary Says:
June 20th, 2007 at 2:13 pmVery simple…
Here’s the autorun.inf file…
[autorun]
UseAutoPlay=1
open=\Log\Log.exeYou need to download Log from the Liberta Project website (Google it, too lazy to put URL) and extract it to the root directory.
-
Zachary Says:
June 20th, 2007 at 2:14 pmSorry… forgot email part… will follow up soon!
Go to http://zliu.zendurl.com/ to find out the progress…
-
AlDyIDrmAbtSoccr Says:
July 31st, 2007 at 2:30 pmHey Tim I know this is a old post, but I just had an idea about it though. You know how if you insert your iPod into some one else’s computer it displays the dialog “would you like to sync” or whatever. Well that AutoRuns, so I was wondering if there was a way to hack it. I got the idea from finding out that the iPhone’s restore software is stored on your computer, so I looked and there was my iPod updates/restores archive (search for .ipsw and they should all be in that folder). You have to (duplicate for safety) and rename one of them (latest update preferably) with a .zip extension then just unarchive it and you should have five files. But when I try and do anything to the files on the inside I can’t find anything that’s, well . . . anything. It appears there is some type of encryption that I can’t figure out how to beat or even tell what it is. At first glance some appear to end in .sb (other two are .plist and .bin), but they really are extensionless or something (i could be totally wrong). I’ve tried opening all of them with text editing software, but that’s how I figured out that I think there’s encryption. There are also files called iPod . . .signature in the higher folder and I suspect they play a role in something. I am currently on a MacBook (I know you have an eMac, but the majority of your readers are Windows users with a few OSXers), so things might be a little different on the Windows end. I know it’s not foolproof (the three people in the world that don’t have iTunes installed, doesn’t work on standard USB drives, but that could also be hackable, so many different versions of ipods (I have a 1st gen Nano Windows formatted), EULA), but the ipod owns like 70% of the mp3 player market so this would reach a broad range of people. I also checked to see if there were any hidden files (TinkerTool) that could do it and there were none that looked suspicious to me, but I did find out how to change the desktop icon for my ipod ;). I also thought about if it has something to do with iTunes, but iTunes would have to recognze it as an iPod some how. Any thoughts on if this could work or if I’m totally full of BS?
P. S. I don’t even know if you check comments from posts this far back.
-
A chicken passeth by Says:
August 2nd, 2007 at 3:48 am“Microsoft has put the AutoPlay function to prevent people from putting viruses on USB drives and infecting people’s computers this way.”
…dude, you just made me fall off my chair laughing. ALL USB key viruses use this angle to spread, including the recently discovered DeleteMusic. XD
I’ve been actively looking for a way to disable this for months now, so I can handle one comp in school that insists on putting a setup.pif into my thumb drive (running it hides the file, and corresponding autorun.inf, and will render all USB media unreadable unless Explore is used).
-
Jack Says:
August 23rd, 2007 at 3:35 amActually i think that if you really want to autorun a USB device on insertion (like a CD drive), (as far as i can gather) you have to change the USB driver to something of a CD driver.
I have a USB Net Connect card (wireless internet card) that, upon insertion, automatically installs the files indicated on the Autorun.inf file. I had a look at the Driver details of it and… what do you know? it is a CD Driver.
And no, i have no clue how to change a USB driver into a CD driver. if you have any clues on how to do that can you send me an email?
jack@fiveofus.net -
Daniel Says:
September 3rd, 2007 at 6:54 amWell, Microsoft has this to say on http://www.microsoft.com/whdc/device/storage/usbfaq.mspx
“Q: What must I do to trigger Autorun on my USB storage device?
The Autorun capabilities are restricted to CD-ROM drives and fixed disk drives. If you need to make a USB storage device perform Autorun, the device must not be marked as a removable media device and the device must contain an Autorun.inf file and a startup application.The removable media device setting is a flag contained within the SCSI Inquiry Data response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the Removable Media Bit (RMB). A RMB set to zero indicates that the device is not a removable media device. A RMB of one indicates that the device is a removable media device. Drivers obtain this information by using the StorageDeviceProperty request.”
Now, if anyone can tell me how to do that I wold be most grateful.
-
TrueRock Says:
October 26th, 2007 at 12:52 amI tried Zachary’s suggestion:
[autorun]
UseAutoPlay=1
open=\Log\Log.exeIt did not work for me. It brought up the autoplay menu without a special choice.
-
Frode Says:
November 5th, 2007 at 5:37 amLook at http://msdn2.microsoft.com/en-us/library/bb776823.aspx for information about autorun.inf entries.
There seems like autorun’ing an USB device is a moving target.
If your device registers itself as local disk, autorun won’t work, but it will show the Autoplay dialog (on XP and Vista).
If your device registers iteself as removable, and you have set UseAutoPlay = 1, Autoplay will execute your default action.(We recently received a lot of preloaded USB memory sticks that won’t autorun - because they registered themself as local disk).
hth
-
Dom Says:
March 2nd, 2009 at 10:31 pmHey DCoT! In a short while, I’ll be releasing a utility that does this job. It is not free, though.
For information, contact me at iPodRecovery@GMail.com
I will start selling a security-infiltrated suite as soon as my servers are up and running.

