How to disable Flash drive autorun ?

Why disable autorun ?

Autorun is an useful feature in Windows. If autorun is enabled, when you insert a CD or flash drive into the USB it will scan the contents of the inserted disc or drive and run any program inside marked as autorun. But this feature is also mostly misused by virus creators to distribute their virues. When a pen drive is inserted into a virus infected pc, the virus create a copy of itself into the pendrive and mark it as autorun. Now when the pendrive is inserted into any other pc, autorun makes the virus run and that pc gets infected.

How to disable autorun in Windows XP ?

One way to disable autorun in Windows XP is as follows
  1. In the Start Menu, Choose "Run..."
  2. Type GPEDIT.MSC and click ok
  3. Group policy editor opens up. In this go to Navigate to Local Computer Policy -> Computer Configuration -> Administrative Template > System
  4. Now in the right side panel if you scroll down, you can see an item "Turn off Autoplay". Double click this to edit
  5. Default option selected will be "Not configured", change this to "Enabled" and in the list below choose Turn off Autoplay on All drives
  6. Now autoplay is disabled. In case you need to enable autoplay, change this to "disabled" or "Not configured"

How to disable autorun in Vista ?

In vista disabling Autorun or Autoplay, open Control Panel and choose AutoPlay. In the top you can see a check box "Use AutoPlay for all media and devices". Uncheck this and choose "Save"

How to disable autorun in Windows 7 / 8 ?

In Windows 7 to disable Autoplay, Open control panel, go to hardware and sound section and choose Auto Play. You can see an option in the top "Use AutoPlay for all media and devices" , uncheck it to disable autoplay