Windows

Disable AutoRun on Windows XP and Vista with a quick registry hack

Don't let Windows force you to AutoRun CDs or DVDs. Bill Detwiler shows you a registry hack the will disable AutoRun on Windows XP and Vista.

I've always been more than a little annoyed by Windows' AutoRun feature. For example, when I insert a TechNet CD, Internet Explorer pops up and gives me a disc menu that I have no interest in. I would rather just navigate through the disc's file system and go directly to what I need. Luckily, there's a way to change Windows' default behavior. In this TR Dojo video, I demonstrate a handy registry hack the will disable AutoRun on Windows XP and Vista.

Note: Before you can disable Autorun capabilities you must install have installed specific Windows updates that solve a problem causing autorun to activity even after it's been disabled. If you've kept your system up to date, you should already have this update. But if autorun still runs after you make the following tweaks, you'll want to double check. Here's a list of the required updates:
  • Windows Vista or Windows Server 2008 - Security update 950582 (security bulletin MS08-038)
  • Windows XP, Windows Server 2003, or Windows 2000 - Security updates 950582, 967715, or 953252

For those of you who prefer text to video, you can click the Transcript link that appears below the video player window or you can also read Brian Posey's article, "10 common issues you can fix with a registry hack," on which the article is based.

About

Bill Detwiler is Managing Editor of TechRepublic and Tech Pro Research and the host of Cracking Open, CNET and TechRepublic's popular online show. Prior to joining TechRepublic in 2000, Bill was an IT manager, database administrator, and desktop supp...

45 comments
olrack187
olrack187

no need for application or software to disable autoruns for winXP and vista OS. just configure it to gpedit.msc, head to administrative templates, system, turn off autoplay (all drives)...

travellingpolander
travellingpolander

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\JSFile\Shell] @="Edit" [HKEY_CLASSES_ROOT\JSEFile\Shell] @="Edit" [HKEY_CLASSES_ROOT\VBEFile\Shell] @="Edit" [HKEY_CLASSES_ROOT\VBSFile\Shell] @="Edit" [HKEY_CLASSES_ROOT\WSFFile\Shell] @="Edit" [HKEY_CLASSES_ROOT\WSHFile\Shell\Edit\Command] @="Notepad.exe %1" [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "NoDriveAutoRun"=dword:3dfffd40 "NoDriveTypeAutoRun"=dword:00000091 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer] "NoDriveAutoRun"=dword:03ffffff "NoDriveTypeAutoRun"=dword:00000004 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf] @="@SYS:DoesNotExist" -------------------------------------------------- First Group: instead of executing these scripts, rather open Notepad instead. (Based on these tools): AnalogX's Script Defender http://www.analogx.com/contents/download/System/sdefend/Freeware.htm Symantec http://service1.symantec.com/sarc/sarc.nsf/html/pf/win.script.hosting.html Second Group: cleaning out "MountPoints2" or the database of all used removable drives inserted in your computer. If you're experiencing a "device not recognized" message. This is best used when combining with the last registry key "@SYS:DoesNotExist" which upon contact dismisses the execution of "Autorun.inf" found in usb drives. (Based on these tools): DriveCleanup http://www.uwe-sieber.de/drivetools_e.html Furthermore, combining "NoDriveAutoRun" and "NoDriveTypeAutoRun", and placing them both in "HKEY_CURRENT_USER" and "HKEY_LOCAL_MACHINE", but at the same time with different settings. Somewhat lenghty but if you let me know your e-mail, I'll send what I meant about this.

kalyanbaidya
kalyanbaidya

this is great to have this script. I will surely try to make auto run disable. thanks.....

johny14
johny14

so this explains the fact that my autorun doesnt work evan if is checked at dvd rom,Thanx for this mail

BearBrad
BearBrad

I've actually just disabled the processing of AutoRun.INF files on devices and root folders by creating an IniFileMapping entry in the registry. REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Windows NT\CurrentVersion\IniFileMapping\ Autorun.inf] @="@SYS:DoesNotExist" Windows treats the file as an old style .INI configuration file. Brad

abv.subscriptions
abv.subscriptions

Many viruses uses this feature to install itself on the computers.

prashanth2980
prashanth2980

Run gpedit.msc and under User Configuration-> Windows Components -> Autoplay Policies We can configure how the media opens. prashanth

billbutler8
billbutler8

I was wondering if there is a similar hack to disable the automatic pop up menu when I plug in my usb external hard drive. usually I would want to just plug it in to have the drive available - instead I have this elaborate menu come up giving me options such as do I want to play a video or open using explorer, etc.

DomerD
DomerD

I hate this feature and already disabled it using a different method. Although i'm not opposed to registry hacks, there is a suite of "PowerToys" from MS that every IT ninja should be aware of. Just google "MS powertoys". My favorite is the Alt-Tab Replacement. The one that allows disabling AutoRun is "Tweak UI".

DaBraunBird
DaBraunBird

hey - where's the promised list of values for the NoDriveTypeAutoRun key?

DaBraunBird
DaBraunBird

You've identified the real problem here - there are 3 different ways (your registry hack, the "what do you want to do" settings dialog that pops up when you insert removable media, and explorer group policy) to do this but none seem to do the whole job and all are poorly documented.

melias
melias

I neitehr love it nor hate it. It has it's uses, but I mostly ignore it save for installation CDs, and even then sometimes I want to browse through the CD rather than run the default installer.

vkszn
vkszn

:) already knew that.

Osiyo53
Osiyo53

Since I neither love it nor hate it. Sometimes its useful, sometimes it is an annoyance. I just avoid it when I don't want it, use it when its handy.

read
read

Windows also has the option (since as long as I remember, perhaps 95?) of holding the Shift key down when inserting a disk into a CD/DVD drive. This should work without any updates required.

phangwi
phangwi

There is actually an easier method to do this(XP). Goto Start run ->Type gpedit.msc ->Tree menu Go to Administrative templates ->System-> and in the panel on the right hand side you will see Turn off Auto Play ->Double click the menu and enable it and select the drive you want to turn off auto play.This is also safe for avoiding viruses.

kwickset
kwickset

For those who are not registry savvy holding down the shift key for a few seconds, after inserting the disk, will achieve the same result. I do find AutoRun annoying, but I still meet people who are unable to lock onto the relevant drive and so everyone has to be reduced to the lowest common denominator. Klaus

bboyd
bboyd

Completely annoyed with that function especially when it drives a flashdrive with some inane access software like those U3 using version. Just another attack vector. Clothed in the guise of ease of use.

TerryBrains
TerryBrains

Is just another App, when you can just do it the right way Reg Edit! App Junkies isn't there enough, MS is trying to simplify these days,. Brains

kapptaink
kapptaink

These are from Bills video I do not know if he has more. 01 or 080 Drive of Unknown types 0X4 Removable Drives 0X8 Fixed Drives 0X10 Network Drives 0X20 Cd-ROM Drives 0X40 Ram Disks 0XFF All Drives

bsmi021
bsmi021

Yes you are correct in that it started with win 95 but most of the customers that i deal with do not even know what to do with the start button. If it dose not do it with auto run people are lost, but i fully understand the virus issues with auto run.

read
read

Doh! kwickset beat me to this.

DaBraunBird
DaBraunBird

This is the Explorer Group Policy mentioned in the video.

husserl
husserl

There is a package that will remove the U3 software and merge both partitions. Truecrypt is a better option for sure.

jovica016
jovica016

I messed up my system editing registry, so if you are not so good with computers, better don't do it! Much easier and safer way is to use program Autoplay Disabler Pro( http://www.autoplaydisabler.us ), which can disabler(or enable) autoplay/autorun for all kinds of drives. And the best of all is that it works for Xp, and Vista, and win 7. Saved my life from autorun viruses :) Cheers!

RookieTech
RookieTech

Yea that is really annoying slowed my 21 year lol go figure who would've thunk it

pkrdk
pkrdk

Leave the registry alone. Hit "shift" while loading the CD,and autorun and the irritating pop-up is disabled. If you load a CD where you want autorun, just don't press shift. How difficult can it be? This has been a feature in Windows since at least 3.0 in the early 90'es.

medwards
medwards

I'd have rather had a text version of this information - for the same reason you don't like AutoRun: give me the information I seek without all the fluff surrounding it. But it was good information, and I thank you for it.

Navyman
Navyman

Some CD's I want to autorun, music, games, and when I install a new program. But, there are times I don't want it to autorun. So, what I do is press the Shift key until the CD rom light goes out. This way I have the control. I have XP with SP3 and the most current update too.

glenstorm_98
glenstorm_98

Like most of Microslop's attempts at thinking for me, I just dislike the contempt they show for their users' ability to know how to do what they need to do. In this case, it manifests itself in a menu that I uniformly curse at and dismiss.

ffries
ffries

Didn't microsoft release an update for all OS' that turned this off anyway?

read
read

This is probably a case of "can't win either way". If you disable this for someone they are bound to read the instructions on some CD they get out of a Cheerios box that says "just insert the CD and magic stuff will happen" (and then the magic won't happen and you'll be getting a call ;-)

DaBraunBird
DaBraunBird

What is the "package" you refer to? The ones I've seen are specific to the manufacturer for the U3 enabled drive and most don't recover the U3 partition (generally small anyway so ..). TrueCrypt rocks!

wandersick
wandersick

also I can't bet on myself always remember holding the shift key. :)

Justin James
Justin James

Do a lookup on KB967715, that's the patch which disabled this functionality. It's only for CDs/DVDs. Flash drives, cameras, etc. still bring up the "What do you want to do with this?" menu. J.Ja

wandersick
wandersick

from the KB web page: http://support.microsoft.com/kb/967715 Do these updates disable Autorun capabilities? No. The updates that are offered correctly respect the registry key values that disable Autorun capabilities. These updates do not change the registry key values and will continue to respect values that were already set before these updates were installed. If the registry values were not set before you install these updates, then the registry key settings will have to be set appropriately in order to disable Autorun capabilities.

goran
goran

Some virus and/or spyware infections prevent modification of this key. Check the value of the key after reboot. If it's not "ff", you'll have to clean infection first. Or, you may try Smart Virus Remover (http://www.technize.com/2008/01/22/smart-anti-virus/) - not a great virus remover, but a handy utility to restore a number of "Windows Default Settings". Tip: Use it in "Safe Mode".

husserl
husserl

I thought M$ disabled it, either in SP2 or SP3. However, I've never had a problem with setting this and other stuff using Tweakui. Until today. Today Tweakui has not done the job on a machine in this room, and Bill's hack has not worked either. I've never had this problem, and I'm hopping mad because this is a vector of infection. Whilst the woman who will have the machine is a fairly astute with computers, she is a busy woman, and has a lot of staff to run, some of whom are a handful. It is inevitable that she will f*ck up. Whilst typing this I've just rebooted and checked again. No dice. Sheesh.