Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

It is possible to use autorun.inf on a CD rom to make it run an exe without prompting the user but the same is not possible on a USB drive. Why? If its possible, how? On a USB drive it just prompts the user to select an action.

share|improve this question

migrated from Dec 20 '10 at 23:13

This question came from our site for system and network administrators.

I've voted to close and migrate to SuperUser as you may find some more info on this over there. From a SysAdmin perspective having it disabled permanently is a very good thing as per @devicenulls answer but as the recent Stuxnet outbreak proved there are still many business systems out there where Autorun on USB drives can be lethal. – Helvick Dec 19 '10 at 16:56
Helvik: I agree. Wasnt aware of the Superuser site. Its really confusing with all the sites coming up. Difficult to keep track of what questions to ask where. Something for the Admins to chew on? – bobbyalex Dec 20 '10 at 7:24
Actually Super User has been around for more then a year, even before Area 51 or Stack Exchange started. – BinaryMisfit Dec 21 '10 at 7:49
up vote 8 down vote accepted

This has been disabled in modern versions of windows (7, vista, etc) due to security issues. There's no way to make autorunning exe's anymore.

The issue was viruses being spread via "found" flash drvies. This is far less likely to occur with cdroms, so the restriction is only for flash drives.

share|improve this answer
So there is no way to do this even with CD ROMs in Win7? I think I remember the Windows 7 installation CD automatically launching setup when I inserted the CD (in Windows 7). – bobbyalex Dec 20 '10 at 7:20
@BobbyAlexander CDs can still do this, though they now pop up a warning/confirmation dialog to confirm you want to autorun a program. USB Mass Storage devices will always show the default what do you want to do with this device dialog, completely ignoring any open section of autorun files (they still allow icon customisation, but no more IIRC). – Bob Mar 7 '13 at 15:37

There are reg hacks that can enable windows 7 to do this. It could also be done through local group policy. It's not advised, as it makes the system more prone to USB viruses, but in some situations where one wants to automate certain behaviors and scripts, it comes in handy.

Current User


Local Computer:


Clearing this value should work.

See Also:

share|improve this answer
Care to elaborate? Possibly with instructions and links? – Kruug Mar 7 '13 at 15:34

You must log in to answer this question.

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