Ask Leo! by Leo A. Notenboom

How do I *really* disable auto-play in Windows XP?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Windows » Windows Configuration

Summary: Auto-play can be a convenient feature but if it's not what you want, it can be difficult to turn off and keep off. The TweakUI utility can fix that.

How do I *really* disable auto-play in Windows XP?

The auto-play feature in Windows was significantly beefed up when Windows XP was introduced. For CD and DVD drives specifically, Windows will first attempt to determine what type of media you've inserted and then perform an appropriate action. If it doesn't know what action is appropriate, it asks along with providing the option to remember that action for next time.

Seems fair enough, except that when I encountered it for the first time it kept forgetting the settings and would always ask. From my perspective that's worse that not having auto-play at all. And then I couldn't turn it off.

If that sounds familiar, then you know my frustration.

Enter one of my favorite Windows add-ons: TweakUI, one of what Microsoft calls "Power Toys for Windows XP". It's more than a toy. It allows you to adjust (or 'tweak') several settings that aren't exposed directly by the standard Windows tools.

Once you've installed TweakUI you'll find a lot of options in it. For our current problem, in TweakUI expand My Computer, and then AutoPlay. Click on Drives and uncheck the drive letter that you no longer want to auto-play. Click on Apply and that's it. No more "what would you like me to do" dialogs.

TweakUI has a number of other settings, I encourage you to install it and browse around in it. It's something I install on every computer I run. (The PowerToys page has a number of nifty tools as well. Have a look while you're there).

Related:

  • Is autorun really that evil, and if so, how do I turn autorun off? Autorun is an increasingly used attack vector for malware. Common techniques to turn it off are incomplete. I'll show you how to turn it off, and recommend you do so.

  • You may want to rethink your recommendation of this product I had problems with. I value feedback on the recommendations I make, but quite often I hear about things I've not recommended at all, as if I had. We'll look at why.

  • Article C1884 - January 21, 2004

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
35 Comments

It is safest to disable CD autoplay in XP using either local group policy or, for an enterprise, an Active Directory group policy. The local group policy editor method:

Click Start
Click Run
Enter GPEDIT.MSC
Group Policy mmc will popup. On left panel:
Double-click Computer Configuration to open submenu
Double-click Administrative Templates to open submenu
Double-click System to open submenu
Double-click Turn autoplay off option which will be near the bottom of the list in the right panel.

The default is the Not configured . Set it to Enabled.

Posted by: Jim Ekleberry at June 18, 2008 9:19 AM

In the steps above, if you wish to disable autoplay for all drives (e.g. usb drives/keys, etc), when on the last step select All Drives instead of CD-Rom drives.

Posted by: Jim Ekleberry at June 18, 2008 9:21 AM

Thankyou Jim Ekleberry! This was the type of answer I was looking for! Oftentimes, these settings are completely configurable without the need for external software! (Not that TweekUI is a bad program however) just that I am proud of you for giving truly professional advice! Indeed many programs exist to help you do things that windows already does (when you know how), and I'm in favour of all those who take the time to educate this to millions of people who would have otherwise paid for software they didn't need! So Bravo to you! (To Leo also, as generally his site is pretty good as a whole!) May the knowledge live on within those willing to share it!

Posted by: JPaget at July 16, 2008 6:27 AM

Mr. Ekleberry... Thanks. I have to mirror the comment of JPaget. Using the tools provided (even if not well exposed) by MS would always be my preferred method as well. I never thought about it being a GP attribute. Too simple for once. Thanks!

Posted by: BT at October 3, 2008 3:38 AM

Quoted from windowsnetworking.com:

"It is safest to disable CD autoplay in XP using either local group policy or, for an enterprise, an Active Directory group policy. The local group policy editor method:

* Click Start
* Click Run
* Enter GPEDIT.MSC
Group Policy mmc will popup. On left panel:
* Double-click Computer Configuration to open submenu
* Double-click Administrative Templates to open submenu
* Double-click System to open submenu
* Double-click Turn autoplay off option which will be near the bottom of the list in the right panel.

The default is the Not configured. Set it to Enabled."

Posted by: nimd4 at October 7, 2008 7:18 AM

ps.

In addition to my comment posted above; The funny thing is: when the Group Policy option is set, it becomes practically impossible to access the Registry key any more! :-F

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CDRom

Posted by: nimd4 at October 7, 2008 7:23 AM

Not sure if I am the only one with this added problem, but when I tried to change the group policy as described above, I couldn't find the System option. To solve this, right click on administrative templates, select add/remove templates, and select system.adm. The option to disable autoplay is now available.

Posted by: Kvwielink at November 9, 2008 6:57 PM

Great advice!!! Thank you so much. I have to agree with Haz, I think that the Group Policy method does not work with Home Edition as gpedit.msc does not even exist on my OS drive. However, TweakUI is a great tool for any XP machine if you know how to use it, or only use it for things like this that give you clear direction.

Posted by: derick03 at January 20, 2009 3:43 PM

Open Notepad and copy/paste the following into a text file:

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

Save the file as something.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.

Posted by: Ras Manyobvo Machipanda at January 21, 2009 8:23 AM

This is how you can easily disable AutoPlay

Open Notepad and copy/paste the following into a text file:

REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:000000B1

Save the file as something.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.

and to re-enable it, use this:

REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:00000091

Posted by: M3TAL_L0RD at April 14, 2009 10:35 AM

Post a comment on "How do I *really* disable auto-play in Windows XP?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

Please wait. Your comment is being processed ...


Question? Ask Leo!