Auto run from USB stick?

Any other tech-related topics
Post Reply
Message
Author
Kermode
Posts: 135
Joined: Fri Apr 14, 2006 5:59 am

Auto run from USB stick?

#1 Post by Kermode » Mon Dec 21, 2009 3:16 pm

Anybody know of a working method to get a program auto running from a USB stick when inserted into a SP3 XP ?

Seems microsoft has done a lot to prevent this from being possible. The autorun.inf file doesn't work for instance (like it would on a DVD)

ashghost
Posts: 383
Joined: Wed Feb 06, 2008 2:55 pm
Location: South Carolina

Re: Auto run from USB stick?

#2 Post by ashghost » Mon Dec 21, 2009 5:49 pm

If you want to do it on just one machine (or just a few), I've got an AutoHotKey script that I used to use. It was my one and only attempt at scripting, and I never got around to making it easier to use so that I could share it with the public. I got to the point of getting it to use an .ini file, but a GUI was beyond me (though I'm sure there are some templates over at the AHK forums). The ini file specifies which drive letters to poll, what drive labels to look for, and then what program(s) to run.

Cons and Pros:
  1. It doesn't actually run the Autorun.inf file, but a program (or up to three programs, as it's now written) defined in the ini file.
  2. You have to set your usb drive to a static drive letter in Windows (unless you're certain it'll always get assigned the same letter), and I believe you need administrative access for that. However, I may be able to re-write it to sequentially poll a number of likely drive letters. I originally used AHK's command to poll all drives, but I had a floppy drive at the time and that made it annoyingly spin up every time.
  3. It's able to look for 2 drives, which increased the complexity enough that I didn't want to try to get it to look for a drive at all drive letters (except fixed drives like a: and c:). If I changed it back to a single drive letter, it could be less than 40 lines long.
  4. It was written to launch a program on the host machine or on an inserted drive with a static drive letter, so it currently requires the full path to the program.
I could probably hack on it while I'm on Christmas vacation. If I change it to look for a single drive again, I'm pretty sure I could make it portable and able to use drive-letter-free paths (eg. "\apps\pstart\pstart.exe"). Are you interested in me working on it? Do you know AutoHotKey and do you just want the script, as-is?

Kermode
Posts: 135
Joined: Fri Apr 14, 2006 5:59 am

Re: Auto run from USB stick?

#3 Post by Kermode » Mon Dec 21, 2009 6:58 pm

I'm afraid I don't know of AutoHotKey.

Its very kind of you to offer - but if windows really can't be configured to allow this, and the only answer is to have a program constantly running, I could write one myself.

But thanks for your feedback :)

donald
Posts: 562
Joined: Wed Dec 19, 2007 4:14 am
Location: knoxville TN USA

Re: Auto run from USB stick?

#4 Post by donald » Mon Dec 21, 2009 11:47 pm

A slight bit off topic but if you have an external hard drive you might get around that problem (auto run), at least in my tests in Vista, and XP. (Running the portableapps.com menu and some apps.)

Please anyone who can test this I am interested in your negative results.

An external hard drive might allow you to auto-run, and it will definitely save soft deleted items to a recycle bin as with any hard drive.

I have been looking at some micro hard drives and I have found some in 30 GB that are only 52 x 48 x 15.7-mm closed, including a full size (type a) flip out usb connector.

I have yet to test the 30 GB but the smaller capacity and cheaper micro hard drives are functional, and not any slower for me than my flash drive. (the usb plug flips out and on the one I am testing swivels 90° left or right.)

I have not tested this with the larger portable hard drives, but I am sure it should work, (unless it is just the machines I am using).

I like a micro hard drive for the same reason i like flash drives, small size and form factor.

I have seen portable hard drives drop to below the $79.00 for 320 GB mark and be sold in a presently too well know national chain store.

I will be posting some of my results in the hardware section.

Kermode
Posts: 135
Joined: Fri Apr 14, 2006 5:59 am

Re: Auto run from USB stick?

#5 Post by Kermode » Tue Dec 22, 2009 6:52 am

I don't care about harddrives.

But if one has to install something to get around microsofts foolery, this might be it: http://thefoolonthehill.net/Autorun.htm

User avatar
Cornflower
Posts: 178
Joined: Fri Aug 31, 2007 7:58 am
Location: Canada's capital

Re: Auto run from USB stick?

#6 Post by Cornflower » Tue Dec 22, 2009 10:53 am

An option is USBDLM. It is non-portable, and definitely is non-stealth, but very useful.
It is a service that you can install and uninstall by command-line, and manipulates USB interaction, from assigning specific letters to USB drives, even to specific USB drive by serial number or ID.

It can also do Autoruns from the service.
For example, I have autoruns disabled for security reasons, as does my office. I do not want autorun.inf to be activated, as this is known and can be hacked, but I do want my syncing software to run, but only from my data USB drive. USBDLM can specify that drive and autorun that app. I also have USBDLM set so that if it finds CAFE on teh USB drive in a set spot, to run it, so I have my alternate apps running from the USB as the default app for some extensions.

It is not intuitive, and you have to uninstall/install the service for every change you make manually to the configuration, but it is to date the most powerful USB utility I have found. It just cannot be submitted here. :)

Kermode
Posts: 135
Joined: Fri Apr 14, 2006 5:59 am

Re: Auto run from USB stick?

#7 Post by Kermode » Tue Dec 22, 2009 11:10 am

Did you check my link?

Seems that is simple.

usieber
Posts: 1
Joined: Wed Dec 23, 2009 1:26 am

Re: Auto run from USB stick?

#8 Post by usieber » Wed Dec 23, 2009 1:30 am

Cornflower wrote:An option is USBDLM.

(...)
It is not intuitive, and you have to uninstall/install the service for every change you make manually to the configuration, but it is to date the most powerful USB utility I have found.
Thanks for mention USBDLM, but changes to the USBDLM configuration do not require a restart or reinstall of the USBDLM service to take effect.

Uwe Sieber

Kermode
Posts: 135
Joined: Fri Apr 14, 2006 5:59 am

Re: Auto run from USB stick?

#9 Post by Kermode » Wed Dec 23, 2009 7:05 am

Ooh, Big Brother :mrgreen:

User avatar
Cornflower
Posts: 178
Joined: Fri Aug 31, 2007 7:58 am
Location: Canada's capital

Re: Auto run from USB stick?

#10 Post by Cornflower » Wed Dec 23, 2009 8:53 am

usieber wrote: Thanks for mention USBDLM, but changes to the USBDLM configuration do not require a restart or reinstall of the USBDLM service to take effect.
Uwe Sieber
Wow, that's a lot of keystrokes I could have saved, had I read your documentation better :oops: I'll remember for my next configuration changes.

Kermode
Posts: 135
Joined: Fri Apr 14, 2006 5:59 am

Re: Auto run from USB stick?

#11 Post by Kermode » Wed Dec 23, 2009 10:40 am

Cornflower wrote:if it finds CAFE on teh USB drive in a set spot
What is that btw?

User avatar
Cornflower
Posts: 178
Joined: Fri Aug 31, 2007 7:58 am
Location: Canada's capital

Re: Auto run from USB stick?

#12 Post by Cornflower » Thu Dec 24, 2009 5:04 am

Cafe. http://www.portablefreeware.com/index.php?id=1317

Cafe allows you to temporarily change the double-click defaults when you click on files. For example, I prefer to have CSV files open in Ted Notepad, which is on my USB. The work setup is that CSV opens in MS Excel. CAFE allows me to change it when my USB is connected, but revert it to Excel once I am finished.

Post Reply