Disable autorun of USB devices

I am annoyed when Windows scan for an Autorun file or any content. Here is how you could stop or disable  autorun of  USB devices and CD drives. By this you could minimize virus attacks distributed through USB Storage devices.

  1. Open RegEdit by Clicking on Start >> Run, type Regedit and press OK 
  2. Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer 
  3. Create a DWORD value with the name NoDriveTypeAutoRun by right clicking on the open space at right side in Registry editor. 
  4. To disable autoplay for all drives set its hexadecimal value to FF
[This method was tested with XP SP2 & SP3]