I want to know if it is possible to put a program on a flash drive and use an autorun.inf file to set the program to run as soon as the drive is inserted and ready. I know how to do this for optical disks with an ISO on to it, but not with a flash drive or any other removable media.

Even more specifically, if this is possible, can this be made universal for various versions of Windows? Any help is appreciated.

  • 1
    Most OS's block this USB auto run by default
    – Moab
    Jun 20, 2017 at 23:08

1 Answer 1


A regular flash drive cannot, but it can identify as a CD drive in order to trick the OS into enabling autorun. This is the technique used by U3 flashdrives, which identify as a composite device consisting of a "CD drive" for the U3 software, and a removable storage device for data.

  • Good to know, thank you for your information. Jun 20, 2017 at 23:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .