0

I'm trying to create an inf file containing a command which opens a .bat file, but it doesn't work.

I've used "run=", "open=", "shellexecute=" but nothing worked.

I've also tried to plug the removable disk, (which contains the inf file), into another computer, but still doesn't work.

Additionally, I've also tried other commands like "icon=" and which works. But when I use the command "run=", "open=", etc. I still can't open the .bat file that I created, and have placed in the same removable disk.

Compo
  • 36,585
  • 5
  • 27
  • 39
y0s0ff
  • 15
  • 1
  • 1
    an `inf` file is an information file, it is not executable, something needs to read from it. other than that, autorun is disabled on flash drives as a security measure. – Gerhard May 17 '21 at 07:52
  • but many channels on YouTube and websites that explain how to open a .bat file with an autorun.inf file – y0s0ff May 17 '21 at 07:54
  • but when I tried it myself, it still couldn't – y0s0ff May 17 '21 at 07:55
  • 1
    but I just said that Microsoft disabled it as a security measure on flash drives. – Gerhard May 17 '21 at 07:55
  • is there still a way to do it – y0s0ff May 17 '21 at 07:59
  • You can use the autoplay feature. but has to be manually setup, so you cannot plug the USB into a buddies PC and expect it to run :) – Gerhard May 17 '21 at 08:04
  • Oowwh, but when I tried to replace the flash icon with an autorun file, it worked. Does Microsoft only disable some commands in the .inf file ? – y0s0ff May 17 '21 at 08:06
  • They didn't disable *anything* in the .inf file. The disabled the autorun feature *in the OS* that is reading the .inf file (and *only* the autorun feature). Which is a good thing in my opinion. – Stephan May 17 '21 at 08:12
  • If indeed they disable the autorun feature in Windows 10, then why when I try to replace the icon of a flashdisk with the autorun.inf file it works. but when I tried to open a file it didn't work. is there a difference between the two? aren't they both included in the command .inf file? (sorry if I ask a lot of questions, I'm still a beginner at this) – y0s0ff May 17 '21 at 08:57
  • Showing a silly little thumbnail picture is a bit different security wise to running a set of commands/utilities or processes. If you cannot explain what you need this for, without it sounding like it could be used maliciously, then that is exactly the reason why Microsoft stopped that type of autorun functionality. – Compo May 17 '21 at 09:14
  • Here's a relatively short and simplified [overview](https://www.howtogeek.com/203522/how-autorun-malware-became-a-problem-on-windows-and-how-it-was-mostly-fixed/) for you to read. – Compo May 17 '21 at 09:30

0 Answers0