0

I am Adel and I am creating an program and I want to save it into an USB and auto run it whenever the USB is inserted to any Windows device, the problem is that the code that I use in Autorun.inf doesn't work. The files in the correct path and the Autorun.inf file in the root of the USB, but it's not working! NOTE: the exe also works

The code:

[Autorun]
Icon=USBSYS\icon.ico
open=USBSYS\file.exe
action=MyUSBName
Label=MyUSBName
3
  • There are utilities you can install on your PC that will scan mounted drives for autorun files and run them if that is what you want. Sep 17, 2019 at 23:13
  • FYI, you are not Adel. You are Mhmd idk. It says so in the lower right corner of your question and in your site profile, and will say so on every question, answer and comment you post here, because it's the name you gave your account. If you want to be Adel, then you can change your account name to use that instead.
    – Ken White
    Sep 17, 2019 at 23:16
  • As far as your question goes, WIndows disabled autorun on USB drives several years ago as an anti-malware measure, so you are never going to get it to work unless you're happy with running on Windows 95 and earlier versions of Windows.
    – Ken White
    Sep 17, 2019 at 23:19

1 Answer 1

1

Autorun.inf does not work anymore on USB drives. Its a security thing to prevent people from putting malicious programs on a thumb drive. It does work on CDs/DVDs though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.