Jump to content
Henry Olive

AutoRun.Inf in USB

Recommended Posts

Good Day,

I have an App Exe File in an USB and I want to AutoRun the Exe File 

I created a autorun.inf file in the usb & wrote below codes

[Autorun]
Open=MyApp.exe
Action=Start portable apps
Icon=diskicon.ico

 

but when i insert the usb, AutoRun.Inf file doesnt fire

what am i doing wrong ?

Thank You

Share this post


Link to post

This was a holdover from CD-ROMs. It's actually a really hairy securitiy risk. You had to go into the ROM-BIOS of the machine and enable a setting to run it, but I'm not sure that even exists any more.

 

At one point, I was looking at something that did that predictably and found a company in Japan or S. Korea that made thumb drives that registered themselves with Windows as CD-ROM drives, thereby enabling the autorun.inf to be called. I got some demo devices for testing and they worked as advertised, but that project ended up not proceeding. A year or so later I happened to check back with the company and they were no longer selling those devices.

 

I've been in many places where their IT Dept literally disables the ability to mount any sort of external memory device via USB to their computers. That does not keep you from transferring files, it just makes it a bit more convoluted. (This is where being a Windows programmer comes in handy!)

Edited by David Schwartz

Share this post


Link to post
4 minutes ago, David Schwartz said:

This was a holdover from CD-ROMs. It's actually a really hairy securitiy risk. You had to go into the ROM-BIOS of the machine and enable a setting to run it, but I'm not sure that even exists any more.

 

At one point, I was looking at something that did that predictably and found a company in Japan or S. Korea that made thumb drives that registered themselves with Windows as CD-ROM drives, thereby enabling the autorun.inf to be called. I got some demo devices for testing and they worked as advertised, but that project ended up not proceeding. A year or so later I happened to check back with the company and they were no longer selling those devices.

 

I've been in many places where their IT Dept literally disables the ability to mount any sort of external memory device via USB to their computers. That does not keep you from transferring files, it just makes it a bit more convoluted. (This is where being a Windows programmer comes in handy!)

In my opinion, Autorun.inf is just the ability of Windows to automatically start something from CD, DVD, USB etc.

In BIOS, you can enable booting from CD, DVD or USB drive etc., but it has nothing to do with Autorun.inf.

Share this post


Link to post
16 minutes ago, David Schwartz said:

the company and they were no longer selling those devices

Strange, all encrypted flash drives are autostarting its mounting application, they must be distributing themselves as CD-ROM.

Share this post


Link to post
8 minutes ago, Vandrovnik said:

In my opinion, Autorun.inf is just the ability of Windows to automatically start something from CD, DVD, USB etc.

In BIOS, you can enable booting from CD, DVD or USB drive etc., but it has nothing to do with Autorun.inf.

It's a convention added to Windows to get CDs to auto-run a setup.exe when you inserted the disc into the drive, as opposed to booting from it.

 

When thumb drives hit the market, you couldn't even boot from them until vendors added that into the BIOS. But it was still problematic to make them auto-run something when you plugged them in. Some vendors added a setting into the BIOS to enable that, because it's a big effing security risk. Why run anti-virus stuff if someone could simply pop a thumb drive into a USB port and have it inject something into the computer without ever displaying something on the screen or tripping the anti-virus stuff?

 

USB ports are (were) problematic for AV scanners because they had to figure out what type of device was connected, if it had any storage, if it made sense to scan it ... how does a memory device differ from a LAN adapter or a WiFI adapter or a serial port? At least CD readers don't change their character, but USB ports do.

Share this post


Link to post
13 minutes ago, Attila Kovacs said:

Strange, all encrypted flash drives are autostarting its mounting application, they must be distributing themselves as CD-ROM.

The first thing I do when I get a USB memory device that has encryption software on it is I reformat the entire drive. I've never looked at that stuff, although I did notice an autorun.inf file on one device. I've not noticed any that show up as CD drives, tho. If you say they auto-run, I'll take your word for that. 

 

(These things I looked at actually registered with two USB IDs: one was a read-only CD and the other was a r/w memory device. The system would look for the autorun.inf file on the CD partition. I think that's how they did it, but you can't simply partition the drive; the device's logic has to respond as two distinct devices, probably as if they are both connected to a hub. It was 20 years ago and the details are fuzzy.)

Edited by David Schwartz

Share this post


Link to post
4 minutes ago, David Schwartz said:

USB memory device that has encryption software on it

No, it has nothing on it, they are out of the box, the same as you are describing. Two partitions, one CD, one hardware encrypted. They exists very well nowadays too.

 

Edited by Attila Kovacs

Share this post


Link to post
1 minute ago, Attila Kovacs said:

No, it has nothing on it, they are out of the box, the same as you are describing. Two partitions, one CD, one hardware encrypted. They exists very well nowadays too.

 

I've worked with a few Samsung T-5 drives and they come with encryption software on them. So do lots of thumb drives I've gotten over the years. The files are usually in a folder and there's a READ.ME file and info about how to use it. I've not seen one that mounts up as two devices, tho. That would always work. I'm curious what devices you're referring to that do that. The encryption would be on the memory device, but the CD device would be unencrypted, but probably flagged as read-only. You should be able to see it but not erase it.

Share this post


Link to post

I'm not sure if I can talk the english you understand. I'm telling the same. Except, there is no encryption software, it's hardware encrypted. The software only mounts the flash drive's 2nd partition with the entered password's hash.

 

see https://www.verbatim.com/prod/usb-drives/professional-usb-drives/store-n-go-secure-pro/

Edited by Attila Kovacs

Share this post


Link to post
On 10/3/2022 at 2:24 AM, Attila Kovacs said:

I'm not sure if I can talk the english you understand. I'm telling the same. Except, there is no encryption software, it's hardware encrypted. The software only mounts the flash drive's 2nd partition with the entered password's hash.

 

see https://www.verbatim.com/prod/usb-drives/professional-usb-drives/store-n-go-secure-pro/

Hardware encryption needs to operate differently. This makes total sense.

Share this post


Link to post

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

×