Tuesday, May 18, 2010

Disable autorun on USB drives in Windows

Nowaday most USB drives contain viruses, believe it or not. And usually these malware exploit the Autorun feature to spread from thumb drive to PC. Disable the autorun feature to prevent malware from spreading.

There are three ways to disable autorun in Windows.
  1. Group Policy Editor
    • Click "Start"->"Run", type in "gpedit.msc"
    • Group Policy Editor is prompted, goes to
      Computer Configuration->Administrative Templates->System

      , see screen shot Group Policy Editor
    • On the right, scroll down to “Turn off Autoplay” and double click on it
    • Set the radio button to Enabled, and change the “Turn off Autoplay on” to All Drives. See screen shot Turn off Autoplay
  2. Registry method 1
    • Go to "Start"->"Run", type regedit
    • In registry manager, browse to "HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Policies\Explorer". If you have admin privilege, you can modify the same key in HKEY_LOCAL_MACHINE
    • Modify the value of NoDriveTypeAutoRun to ff (hexadecimal)
  3. Registry method 2
    • This method requires users can access to modify registry in HKEY_LOCAL_MACHINE
    • Bring up regedit and browse to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\"
    • If key "Autorun.inf" doesn't exist, create it
    • Create a string value "@" as "@SYS:DoesNotExist"
Download this reg file DisableAutorun.reg and double click to set the above registry trick.

0 comments: