How to Switch Off Autorun on Windows XP

Windows XP will automatically open or run the contents of CDs and USB sticks when loaded or inserted. Here's an easy way to prevent it.

To disable autorun [current user, all devices]: click here

To disable autorun [current user, removable devices]: click here

To disable autorun [all users, all devices]: click here

To disable autorun [all users, removable devices]: click here

The links above will download Windows .reg files which if allowed to execute will modify your Windows registry settings. Please note that these files have only been tested on Windows XP Home Edition, but they should work okay for Win XP Pro. Obviously, you proceed at your own risk etc. but quite a few people have already used these links (as provided in my earlier guide to Windows XP security and so far no-one's emailed or commented to accuse me of blowing up their computer. You should check the contents of the files with a text editor such as notepad to ensure they don't contain anything malicious, but if you've found this page by searching for information about disabling Windows' autorun feature, then I doubt I need to tell you that. If you're looking for information on how to disable autorun in other versions of Windows (or information on additional settings for these registry keys), then this Microsoft article should prove useful.

The .reg files I've provided above will add or modifiy the following registry keys:

- for the current user, or:-
- for all users.

The NoDriveTypeAutoRun key will be set to the value of 04 (hex 04) or 255 (hex FF) depending on whether you want only USB sticks (04) or all removable devices (FF) prevented from auto-running.

While the autorun feature is often convenient, it is also a security risk and is used by viruses and malware to spread from machine to machine using removable devices such as CD/DVDs and memory sticks.

See this article for more info on the security risks and how the registry changes work.