Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to write an autorun.inf file for my USB pen. My current autorun.inf file contains the following. However, it is NOT doing anything.

label=New label for drive
action=Open test

I have both test.exe and drum.ico on the root of my usb drive.

I am using Windows XP SP2. What to do to make the computer see the autorun.inf and respect its commands?

share|improve this question

marked as duplicate by Scott Chamberlain, Dave M, TFM, Dennis, BBlake Mar 4 '13 at 21:21

This question was marked as an exact duplicate of an existing question.

Keep in mind that Windows Vista and newer will not execute autorun on removable disks. – Bob Mar 4 '13 at 8:50

Safely remove your USB drive, then restart your windows and plugged it again, for me it works.

check your antivirus about blocking USB auto-run.

share|improve this answer

By default USB drives have auto run disabled, there is a registry keys that effect this, it is located for the entire machine


or the currently logged on user


The machine setting overrides the the user setting if both are set (on my XP box it was only listed under the user setting).

The value of this key is a bitmask, you need to add the values together to get the combination you want.

  • 0x1 Disables AutoPlay on drives of unknown type.
  • 0x4 Disables AutoPlay on removable drives.
  • 0x8 Disables AutoPlay on fixed drives.
  • 0x10 Disables AutoPlay on network drives.
  • 0x20 Disables AutoPlay on CD-ROM drives.
  • 0x40 Disables AutoPlay on RAM drives.
  • 0x80 Disables AutoPlay on drives of unknown type.
  • 0xFF Disables AutoPlay on all types of drives.

So if you want to enable USB drives you will need to "subtract" 0x4 from the value you have (but only if the number has the 4 bit set).

This solution works all the way from Windows 7 to XP and likely works on windows 8 but is untested by me.

Read more:

share|improve this answer

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