Henry Olive 5 Posted September 27, 2022 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
Henry Olive 5 Posted September 27, 2022 I just noticed that there is a Windows Api group, should i write this question to Windows Api ? Share this post Link to post
Tom Chamberlain 47 Posted September 27, 2022 Autorun from USB is turned off by default on Windows 10 and 11 now. Share this post Link to post
Henry Olive 5 Posted September 27, 2022 I'd like to thank whoever moved my question to this group. Thank You So Much Tom. Share this post Link to post
Der schöne Günther 316 Posted September 27, 2022 I haven't seen Windows automatically launching an application after plugging in a USB drive for ten or 15 years. Consult the official documentation about autorun.inf: Autorun.inf Entries - Win32 apps | Microsoft Learn Share this post Link to post
David Schwartz 426 Posted October 3, 2022 (edited) 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 October 3, 2022 by David Schwartz Share this post Link to post
Vandrovnik 214 Posted October 3, 2022 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
Attila Kovacs 629 Posted October 3, 2022 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
David Schwartz 426 Posted October 3, 2022 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
David Schwartz 426 Posted October 3, 2022 (edited) 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 October 3, 2022 by David Schwartz Share this post Link to post
Attila Kovacs 629 Posted October 3, 2022 (edited) 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 October 3, 2022 by Attila Kovacs Share this post Link to post
David Schwartz 426 Posted October 3, 2022 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
Attila Kovacs 629 Posted October 3, 2022 (edited) 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 October 3, 2022 by Attila Kovacs Share this post Link to post
Pat Foley 51 Posted October 3, 2022 Here's 1999 article on "Digital Rights" when Dvd players forced one to view ads before decoding the movie. https://www.zdnet.com/article/dvd-encryption-break-is-a-good-thing/ Back then most proprietary software needed original floppies or CD plus a key to install. Expensive software had dongles. Share this post Link to post
David Schwartz 426 Posted October 8, 2022 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