How to disable autorun for Windows XP Home

Solution 1:

Open Notepad and copy/paste the following code:

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf]
@="@SYS:DoesNotExist"

Save the file as DisableAutorun.reg. (You have to be sure to change the "Save File as Type" to "All Files" before saving, or Windows will try to save it as a .txt even if you typed in .reg).

Locate the file you just saved and double-click the file to run it. You will receive a prompt asking if you want to add the data to the registry. Click yes to allow the modification.

The above method nulls any request for autorun.inf and works on XP Home or Pro, as well as Windows Vista/7.

Note: If you opt to disable autorun using any other method (e.g. the method John T. suggested), you will first need to install an autorun patch from Microsoft that allegedly resolves issues that cause autorun to run even after it's been disabled.

Solution 2:

To Disable autorun on all devices:

Install this patch from Microsoft.

  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. Locate and then click the following entry in the registry:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoDriveTypeAutorun

  1. Right-click NoDriveTypeAutoRun, and then click Modify.
  2. In the Value data box, type 0xFF to disable all types of drives. Or, to selectively disable specific drives, use a different value as described in the "How to selectively disable specific Autorun features" section.
  3. Click OK, and then exit Registry Editor.
  4. Restart the computer.

Source: How to disable the Autorun functionality in Windows

Solution 3:

One can also grab TweakUI and use it to disable autorun on drives individually.

(By the way, it's got lots of other cool tweaking powers.)