Sign in to follow this  
Followers 0
MadBoy

AutoRun from USB

22 posts in this topic

I was reading about Autorun from USB and Microsoft says that everything that is reported by GetDriveType as Removable isn't going to let autostart work. However i seen some programs allowing that. So is there a way (registry modification or so) to make it work? I know solution to make it autostart program when you click on REMOVABLE Drive but i would like it work instantly when i plug in usb drive. Any help will be appreciated.

Thanks :lmao:


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites



i like it too plz help

Share this post


Link to post
Share on other sites

i like it too plz help

Yap, I'd like to do the same. Is there any way to autorun something for ex. from a pendrive?

Thanks for any help in advance.

Regards,

b0ris

Share this post


Link to post
Share on other sites

This is the autorun.inf for Truecrypt "Traveler Disk Setup", works fine for USB-sticks, check it out:

[autorun]
label=TrueCrypt Traveler Disk
icon=TrueCrypt\TrueCrypt.exe
action=Mount TrueCrypt volume
open=TrueCrypt\TrueCrypt.exe /q background /e /m rm /v "tc_container.tc"
shell\start=Start TrueCrypt Background Task
shell\start\command=TrueCrypt\TrueCrypt.exe
shell\dismount=Dismount all TrueCrypt volumes
shell\dismount\command=TrueCrypt\TrueCrypt.exe /q /d

Share this post


Link to post
Share on other sites

This is the autorun.inf for Truecrypt "Traveler Disk Setup", works fine for USB-sticks, check it out:

[autorun]
label=TrueCrypt Traveler Disk
icon=TrueCrypt\TrueCrypt.exe
action=Mount TrueCrypt volume
open=TrueCrypt\TrueCrypt.exe /q background /e /m rm /v "tc_container.tc"
shell\start=Start TrueCrypt Background Task
shell\start\command=TrueCrypt\TrueCrypt.exe
shell\dismount=Dismount all TrueCrypt volumes
shell\dismount\command=TrueCrypt\TrueCrypt.exe /q /d
Thanks, that looks useful, I will test it as soon as I get home. Unfortunately my computer at work is configured to not autorun anything...

Share this post


Link to post
Share on other sites

Disabled autorun is the safest.

Share this post


Link to post
Share on other sites

U3 for example installs an cd-drive along the removable drive when you plug it in, thus allowing the autorun to be ran from the cd.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

U3 for example installs an cd-drive along the removable drive when you plug it in, thus allowing the autorun to be ran from the cd.

Yeah, I was thinking about the same thing. Maybe there's a way, to somehow emulate an optical drive, so at the end windows would see the USB drive as a CD. However, I have no idea how to do that...does any of you?

Share this post


Link to post
Share on other sites

Wouldn't it be easier to use the link that guy provided? :P

Share this post


Link to post
Share on other sites

Wouldn't it be easier to use the link that guy provided? :P

No mate, that's something totally different. I'm looking for some idea or code to autostart an executable from a USB drive, and the link is about autodetecting a USB drive.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

You can only modify the computer to allow autorun on removable drives or make a program that will start the autorun executable on that drive.

As far as modifying an existing USB stick goes to autorun on any computer: Forget it. This is a big security risk and you will not be succesful in any attempts.

Edit: I am also celebrating my 50th anniversary of repeating myself over this USB autorun issue.

Edited by Manadar

Share this post


Link to post
Share on other sites

Manadar is right, U3 drives get away with doing it by emulating a CD drive in hardware. That's not something we can just write a little script to do for us on every flash drive. If you really want that functionality, buy a U3 drive, they're cheap now, and with software found on the net (and a little work), you can put whatever you want on the CD partition to Autorun, or just be available to you without fear that it will be overwritten.

Share this post


Link to post
Share on other sites

Manadar is right, U3 drives get away with doing it by emulating a CD drive in hardware. That's not something we can just write a little script to do for us on every flash drive. If you really want that functionality, buy a U3 drive, they're cheap now, and with software found on the net (and a little work), you can put whatever you want on the CD partition to Autorun, or just be available to you without fear that it will be overwritten.

Well, I think there's always hope, maybe I'll think of something myself then. I don't want to use other's software or a U3 drive, as I want to make my own thingy at the moment, and if I decide to sell the software in the future, I don't want any other's work in it.

Share this post


Link to post
Share on other sites

Well, I think there's always hope, maybe I'll think of something myself then. I don't want to use other's software or a U3 drive, as I want to make my own thingy at the moment, and if I decide to sell the software in the future, I don't want any other's work in it.

There's no hope. You may as well abandon what you have left. I spent a week on figuring this out a few years ago ( before U3 ) and the only solution I could come up with is write a driver.....

Share this post


Link to post
Share on other sites

Why do you even want an autorun flash drive? What possible use is that besides malicious? If you have the time to plug the device in, you can open it in explorer.

Share this post


Link to post
Share on other sites

There's no hope. You may as well abandon what you have left. I spent a week on figuring this out a few years ago ( before U3 ) and the only solution I could come up with is write a driver.....

Okay, I believe you. However, it seems like autorun works under xp if autorun is not totally disabled...

Share this post


Link to post
Share on other sites

Why do you even want an autorun flash drive? What possible use is that besides malicious? If you have the time to plug the device in, you can open it in explorer.

You're watching too many sci-fi movies dude :P

I don't want to use it for spying, or any malicious crap, I just want to run an executable after the pendrive is inserted.

For example it will make an automatic backup of a certain directory, and it's much more elegant, to just plug in the pendrive, and wait until it tells me that the backup is finished, then just remove it from the machine without any clicking and stuff.

So it's not a matter of life and death, I can also double click on it, but I'm too posh to do that :unsure:

Share this post


Link to post
Share on other sites

Sorry, totally had a brain fart with my earlier post. haha.

I'm with b0ris, there are plenty of legit uses for autorun on a pen drive. At my job, I wrote autoit scripts to change some settings and open a webpage, it helps with the hundreds of PCs we image and tweak. However, if I could just plug the drive in and it ran automatically, that would be really helpful. I could just throw a self-destructing script into the image, but everybody does it different so I can't really do that.

You can probably pick up a U3 drive if that will work, but I've heard a whole lot of complaints about it not always working as intended, so it may or may not be useful for you.

This has U3 on it http://www.newegg.com/Product/Product.aspx...N82E16820171362 $14 8gb flash drive. Free shipping at the egg. Read the plentiful reviews of people who hate U3 haha.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0