Subscribe to How-To Geek

Disable Autoplay of Audio CDs and USB Drives

I find it very annoying when I go home from work and plug my laptop into my external hard drive… The autoplay window always pops up and asks me what I want to do with the files, which may be fine the first time, but definitely isn’t after a year of that.

To get to the configuration screen for this setting, go to Start Menu \ Run and type in:

gpedit.msc

You will see the Group Policy window. You should select Administrative Templates \ System in the tree view:

You will see an item in the right side pane called “Turn off Autoplay”

Double click the item, and set the radio button to Enabled, and change the “Turn off Autoplay on” to All Drives.

Now you should be safe from the autoplay monster.

The Geek is the founder of How-To Geek and a geek enthusiast. This article was written on 11/11/06 and tagged with: Customizing: Tips & Tweaks, Windows

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:
Similar Articles Featured Wiki Articles
Latest Software Reviews Quick Linux Tips
Geek Arcade Popular Forum Threads

Comments (100)

  1. Patrick McKelvy

    Thank you very much! It has been irritating me over a year how Windows ignores my preference to not AutoPlay under the Drive Properties…

  2. Ahmed Khan

    hey this thing is totally right but in my computer i didnt find any file of this name gpedit.msc i search everywhere but i dont have this file in my computer soo would you like too help with any other solutions bye waiting for your keen response

  3. Win Holland

    I have the opposite problem.- I liked that autoplay- it’s gone and I want to restore it!
    ..until recently my autoplay worked so that whenever I inserted my Sandisk the window would appear asking me what I wanted to do…..I really liked that feature and now it’s disappeared (I think after I did a tune-up offered by Dell). Any advice about restoring it?

  4. Diamond

    Hi guys!Pleazzzz help me out here!I have a similar prob.When I double-click on my external usb drive(250giga)an open with dialog pops up but the option for choosing a programme are deactivated(grey).If I right click on the drive and click open or explore it will open allright,but what about the double click.I should also mention that this is a prob that persists.I have noticed that the only way to get rid of it is by formatting the disc.I found that out because this prob infected my other drives (the 2 internal partitions I have and a usb stick).The most remarkable is that when I plugged the stick into another pc,the prob was still there,even for the other pc.(Not for its internal drives,of the second PC I mean.)To sum up,now I have formatted the 2 internal drives of the first PC and the usb stick,and they are just fine right now,but the external 250 giga drive is still a prob.Please suggest any solution apart from formatting!I ‘m trying to avoid that…Thx in advance!
    P.S.:Please respond as soon as possible!

  5. GR

    Okay, guys, this is driving me nuts. I used to put audio CDs in and explorer gave me each track’s file size and I could drag the files to my hard drive. Suddenly, every track is 1kb and won’t copy, explorer just makes a shortcut. help?

  6. Ben

    This doesn’t seem to work on XP Home edition (there’s no gpedit). Is there a registry value you can change or something instead?

  7. John

    gpedit.msc is one of the features of XP Pro; it does not exist in XP Home.
    For Windows XP Home, try TweakUI from Microsoft instead; it can be downloaded at http://download.microsoft.com/.....ySetup.exe

  8. Ben

    Thanks John. I did indeed try TweakUI, and it worked really well. It should come with Windows, IMO.

  9. Shawn

    YOU RULE!! I’ve been trying to turn AUTOPLAY off on my external drives for months. Many thanks!

  10. sohaib

    well i want that how can i disable my other removable devices such as the ‘c’ derive or ‘d’ derive of hard disk.because when i double cliclk on the ‘c’ derive it does not open it then i right click on the same derive and then click open it.and there is an option comes out whn i click any of ma hard derive the option is ‘auto play’ why it is appear whn i right on the any derive.plz plz help me out em waitin…..of ur response.tc

  11. IMTIAZ

    hi,
    When iam right click on any hard disk partition it’s shown Autoplay command in Menu. normally it will show Open Command as first command.

    means double click on parition it’s go to open a new window .
    how to fix this problem please give me reply
    Thanking you

  12. Ken

    i was affected by one of the virus name PET.32 and it was get rid off. Now, i have a problem that the time when i open my harddisk, it appears that ” Windows cannot find pet32.exe. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click search”.. Can anyone have anyways to help me solve this problem pls..????

  13. Troy

    Hi,
    i’m having the same problem. I have 3 drives in my pc (c, d, e ). When i right click on my c: drive the default is open but on my d & e drive it is auto. All 3 drive are physical hard drives. i’ve tried “regsvr32 /i shell32.dll” as well as

    Go to the the registry editor:
    under the key
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2

    delete all sub keys which have similar structure like:
    Shell\Auto
    Shell\Auto\command with value = C:\\WINDOWS\\system32\\RunDLL32.EXE Shell32.DLL,ShellExec_RunDLL infrom.exe
    Shell\AutoRun
    Shel\AutoPlay

    i do not find the subkeys on my pc but if i delete the “mountpoint2″ completely then the defaults are correct. only problem is when i reboot it puts the registry key back and the same problem.

    i have updated my virus package and checked for viruses, none found. my c: drive have been formatted and re-installed.

  14. Player

    You are the king !!!

  15. Marcel

    Thanks a lot this worked brilliantly

  16. zaki uddin

    hey its not working on d drive and e drive, so it would be good of u if u provide anyother trick to turnout autoplay off

  17. jai

    i have a problem.when i open add/remove programe then it shows all the programe but some of them i can’t delete.some are deleteable.plz give me solution.

  18. Mary

    Thank you so much for your article. I have been searching for a while to find the instruction on how to turn off the auto run pop-up but could not find it. I am glad you helped.

  19. Loai

    thank u sooooooo much

  20. volrider

    I have been hunting around for a solution to a similar problem. I have for some unknown reason lost the autoplay on my CD/DVD drive and also when I put a USB drive in it used to pop up with an option to open, play etc. Now this does not happen. I have checked the registry and autoplay is switched on, I have checked it is enabled on every drive and also tried TweakUI but that says it is set to auotun?? I seem to be going round in circles with no luck. I have XP Home with SP2 installed any one that can help me I would be eternally grateful

  21. Eric

    Thank you thank you thank you thank you thank you thank you thank you!!!!!!!!!!!!!!!

  22. moyassar

    i want to have the USB autoplay on since i had it before and then lost it. bythe way the windows operating system is XP professional.

  23. mark

    i have the same prob. how can i disable my other removable devices such as the ‘c’ derive or ‘d’ derive of hard disk.because when i double cliclk on the ‘c’ derive it does not open it then i right click on the same derive and then click open it.and there is an option comes out whn i click any of ma hard derive the option is ‘auto play’ why it is appear whn i right on the any derive.plz plz help me :-) …..of ur response.tc

  24. devendra

    anyone pls help me with this

    i had an external hard disk but had some problemwith it
    and now the system is not recognizing it
    as soon as i plug it to the system it shows a msg of unknown device
    it has a lot of important information in it
    someone please help me
    i have to get the entire stuff of the hard disk back

  25. Greg

    Can’t believe I forgot about Tweak UI from Microsoft. The icon is right on my desktop. It worked like a champ to turn off the Autoplay feature on my external hard drive.

    Thanks John

  26. Mark

    Many thanks for your help!

  27. Chris

    Thank you thank you thank you thank you thank you thank you thank you!!!!!!!!!!!!!!!
    Eric on October 9, 2007 5:09 pm

    I can only second this :)

  28. kmicic

    Hey, to all that still have problem with drives D, E, …
    Delete the file autorun.inf from the drive and restart windows.
    :) )

  29. Iyeru

    gpedit.msc does not exist in my Windows XP SP2.

  30. vp9984

    cant find gpedit.msc

  31. Jim

    Help! i have vista ultimate 32 bit, and i can find and open the gpe, and i can find and open system under administrative templates. I have many items listed, but none have anything to do with autoplay. where is it??

  32. Haytham

    When I use duble click it dose not working and it infected in all partions in my pc , Iam using winxp sp2 .. plz any one help me .. I have this problem in our network and I have 25 pc have same problem ..
    Thanx
    Haytham

  33. vvv

    If some kind of virus have changed the default action of your hard drive to AutoPlay
    open regedit.exe and find this key

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
    go trough all CLSID’s (those garbish alphanumeric keys)
    then check all Shell subkeys and change the Default value/Data to “Open” and/or remove all the autoplay subkeys
    if you want to save the autoplay option to certain drives (e.g. CD/DVD drives) simply do all the above 1 step at a time and constantly check what is changed in Explorer (these registry changes work instantly). It is hard to find which CLSID corresponds to a certain drive, thus after changing the “shell value” you need to right-click the drive in explorer and see if the AutoPlay or Open is set as the default(bold) action.

    And next time use antivirus :)

  34. Dj

    dont delete mount point2 just right click on dat and click on premisions and then click on restricted:d
    here u go

  35. Richard Yager

    OK. All I did to turn this off is Open MyComputer, right click on the CD player, Click on Open AutoPlay. At the bottom (of the window not the list) is a link that says ‘Set Autoplay defaults in control panel’; click that link and set your preferences. Simple!!!

  36. Henry

    This didn’t work for me, the run command didn’t work, however properties of the drive, autoplay tab – then selecting don’t do anything for every possible media option did the trick.

  37. chris

    i have tryed this but it cant find gpedit.msc, is there anouther way of doing this

  38. Lakshmi Narayanan

    Thanks a lot…I was fiddling with registry for this before…Thanks again…

  39. Mattey

    I have problem with hard disk, It is not open when I double click. It says choos aprogram……..to open.

  40. SweBee

    You can also turn off autoplay feature for USB drives by editing Windows Registry:
    1. Find key HKEY_CURRENT_USER | Software | Microsoft | Windows | CurrentVersion | Policies | Explorer
    2. Create new entry to turn off autoplay function by right click Edit | New | Dword Value then name it NoSaveSettings
    3. Find an entry NoDriveTypeAutorun with a Dword value 91 and give a Dword value 95
    4. Restart your PC

  41. trubye

    Hi i have the exact opposite of this problem, autoplay does not come on when i plug my usb stick in my computer and i want it to come on. Any ideas?
    cheers

  42. Jon

    Gotta love the silly virus. If you have the silly virus, disable auto play, get rid of the virus on your computer, and delete the files off your external or thumb drive. To delete the files off you thumb drive; open my computer, click tools>folder options. On the view tab, uncheck hide protected operating system files. eject and re-attach your external. It should open normally now and you will see a autorun.inf and a boot.exe or ah.exe. delete these files and you are rid of the silly virus. you external is not protected if you plug it into another computer but it will not transfer back onto yours so just delete the files when you see them.

  43. vikas gupta

    what a solution. we were formatting pc till date for this problem. thanks a lot

  44. SHYAM

    hi, it took me only a minute to solve this problem the way you have shown.thanks a lot

  45. Duc Nguyen

    Thanks a lot. You saved my life ;-)

  46. joe

    hi! i have a similar yet quite a different problem… i can’t open my c drive by double-clicking. when i do that, a window opens that says “choose a program among the list to open it” or something like that. this also appears when i right-click the c drive and choose either open (it didn’t change to autoplay) or explore. in short, i can’t open my c drive! what should i do?

  47. Nelson

    Check if there is a hidden/visible autorun.inf file on the root of the drive. if yes remove it.

    Also, some virus/trojens can create autorun.inf files that are completely hidden

  48. Thomas

    Bloody brilliant mate. Saved me from the most annoying part of my work. Everyday i hook up atleast 20-30 Harddrives to my computer to “ghost” them. And this saves me both time and stress. Thank you

  49. Sajan

    Autoplay was such an annoyance for me. Thank you for helping me getting rid of it.

  50. zeeshan ali

    Thanks alot nice post :)

  51. CharlesIV

    can the gpedit.msc solution be scripted ?

  52. Jon

    You should try to repair windows. If you cannot find the file, it’s probably because windows lost it or you have a virus. Try doing a virus scan as well. I recommend Symantec. Hey Diamond: you probably have the silly virus. Follow my instructions in my previous post to find it.

  53. Nemanja

    Works fine! Bravo! Thanks!

  54. Starko

    With TweakUI for XP you can choose which types of drives to disable:
    - removable drives.
    - fixed drives.
    - network drives.
    - CD-ROM drives.
    - RAM drives.
    - unknown type.
    - all types of drives.

    For instance you might want to disable Autoplay for USB sticks but leave Autoplay for CDs on, etc.

  55. Robert Bowden

    My Name is Rob and I have a problem with getting my autoplay back on my PC for Windows XP.
    I deleted Photoshop Album Starter 3.0 off my computer and ever since then my autoplay function has been missing.

    Can you please help me with this problem as I am sick of having to go through my computer followed by the scan disk to get to my folders.

    Many thanks Rob.

  56. Jansen

    I can’t find anything called System under Administrative Templates. There is just Windows Components.

    Got any idea guys?? ‘Coz it seems very weird to me while everyone’s Group Policy contains it but mine doesn’t.

  57. David Bond

    Great tip – thanks!

  58. Monolith

    Great TNX!

  59. dashakol

    It’s strange but when I run gpedit.msc and go to “administrative templates” I can only see “windows component”. The other three subcategory are not there . What’s wrong with my xp?

  60. Mario

    Yes, yes, yes
    thank you!!!
    it’s Great tip – many thanks!
    Mario :)

  61. mak

    @the OP of the guide (The Geek i assume :) )

    XP is OS which is running right? Which screen font is that? Its really smooth and looks lovely in cleartype.

    Can anyone tell me which font that is and how to change my XP to that font.

  62. Matthew

    I have XP home and downloaded TweakUI and i unticked the boxes but it hasnt done any good what so ever it still keeps on popping up.
    Please help me
    Thanks

  63. thanasi

    oh yeah! this is what im talking about!!
    thanks

  64. Ashutosh Kumar Bhardwaj

    Hey guys you are great helpers at How-To-Geek I allways wanted to get the rid of the autoplay problems and your easy steps helped me

  65. jlib

    To those who can’t see it, the administrative templates are only visible to members of administrators group. And since you are there, those using the Group Policy method might as well turn off autoplay under the user section as well, or as as they so ineloquently word it “enable disable autoplay”. In this day of rapidly spreading autorun trojans, disabling autorplay is absolutely essential for those using USB drives between computers. Some methods only turn it off for CDs. The Group Policy editor allows you to turn it off for all drives.

  66. jlib

    Oh, and for admin users of XP Pro, in gpedit.msc you first need to manually add the system template to the administrative templates sections of computer configuration and user configuration sections. Just right click on administrative templates.

  67. Andres

    YEAHHH!! Thanks you!!!!!!!!!!!!!

  68. Hadas

    Guys.
    If you want to cancel autoplay only for Iphone but leave it active for the rest all you need to do is connect your Iphone (ignore or dismiss the autoplay) then go to my computer, find your iphone drive click the right mouse button, select properties, shift to the ‘events’ tab and choose ‘do nothing’ for the event of connecting.

    I presume this will influance the iphone device only.

  69. b

    Wow, this is so awesome, I have lots of computers, and lots of external hard drives, and I’m always swapping them around since I have to move lots of data often, and networks are just to slow when you’re shuffling hundreds of gigs around. Anyway, autorun has been really, really and I mean *really* annoying me for years. Having it gone now is like bliss, pure happiness. Thank you.

  70. Frank

    Thank`s for this information. The USB DRIVES AUTOPLAY were driving me crazy!

  71. tarun

    many thanks – for win xp home – downloaded http://download.microsoft.com/…..ySetup.exe
    went to drives- autoplay and disable, its working

  72. jonathanMari

    thank you very much for your help..it gives me more knowledge..hope that you will continue your teachings with other people who didn’t yet explore there computers..God Bless

  73. Nuno Brum

    I was so anoying the Scan for media….. completely useless in my point of view, specially when inserting media with lots of data.
    Thank you soooooooooooo much for this.

  74. pacific

    yeah u rule dear …..thanks for the suggestions for autoplay option…

  75. Vinh Lam

    Thank you, good way to do as suggestion… cheers for me :D

  76. Kadkhoda

    I found out about Autorun.ini being active on a USB drive when I saw the Recycler trojan coming via a USB flash memory.
    That was a few weeks back until today I saw the BBC article on Microsoft paying $250K bounty for finding some other virus maker that apparently also comes via USB and other autoplays. I was wondering why they have designed this feature in the first place and why is it “not so obvious” to remove the feature.
    Thank you for your straight forward instructions. Now my U3 doesn’t startup automatically either, which is a blessing because most of the time I want access to the storage area.

  77. Josh

    Thank you! Thank you thank you thank you. Autoplay has plagued me for the last time :D

  78. Jesuraj

    My computer restarts automatically as soon as i double click the setup file of the game medal of honour airborne, and installation does not proceed.

  79. Mike

    THANKS

  80. M

    Thanks a lot, it works great…

  81. The Doctor

    Thank you!

  82. Bob

    I liked the Tweak UI Microsoft program option. It allowed me to shutoff the USB drives, but still keep autoplay for the CD-ROM. Thanks to all for releaving all my future pains. I’m going to install this program on all my computers.

  83. Nick

    Every time I connect my USB Device windows want’s to go to the update site to find something and it want’s to istall the driver again and again. I have the software for the device installed but it can’t find it.

  84. AJ

    The best programme for fixing autoplay is AutoPlay Repair (see: http://www.snapfiles.com/get/AutoplayRepair.html) Whether you want to switch it off or want it back, this programme will fix it. can can even switch off all potential drives (ie: s drive, t drive, u drive, etc).

    Note that many viruses use this facility to run their malicious code, so IMO it is best to switch it all off. It’s the first thing I do when I install Windows.

  85. Joyce H

    TweakUI was really easy to use. I was trying to enable my Autoplay for so long… And ‘My Music’ folder lost it’s default icon too. But with TweakUI, i was able to restore everything back to the way it was.
    Thank you John! =)

  86. Crow

    “dashakol
    It’s strange but when I run gpedit.msc and go to “administrative templates” I can only see “windows component”. The other three subcategory are not there . What’s wrong with my xp? ”

    Same thing on my XP.
    But Henry’s advice above saved the day.

    “Henry
    This didn’t work for me, the run command didn’t work, however properties of the drive, autoplay tab – then selecting don’t do anything for every possible media option did the trick.”

    More specifically:

    windows XP SP3

    1 left click ‘My Computer’
    2 right click the drive in question
    3 if ‘autoplay’ is on the popup list ignore it!
    4 instead choose ‘properties’
    5 chose autoplay tab
    6 for every type of media in the list:
    a “select an action to preform”
    b ” take no action”
    c apply
    d OK
    7 redo the above and check for each type of media in the list that ‘take no action’ is indicated by color. It is easy to make a mistake while doing 6.
    8 Now ONE drive is done (maybe an external plug in drive E). So redo for each other drive (maybe the CD tray drive D).

    Anyways now the autoplay monster has disappeared for good on my system!

  87. IceMan

    Hope this keeps all USB Virus away.. Thanks for this article..

  88. Scud

    If System template is missing, right click on “Administrative templates”, select “Add/Remove templates…”, then click on Add, choose System.adm, click on Open, then close. Now you’ll see System under Administrative templates.

  89. Crow

    Thank you Scud!

    Now me and all XP users should be able to easily turn on/off autoplay.

  90. jeasneas

    I know you’ve heard this a million times before, but once more can’t hurt:

    1000X THX!!! that thing’s been driving me crazy!!!

  91. neo

    The solution is to globally block autorun.inf files from executing, without trying to use the dialog boxes in XP and Vista to do this. Here’s the procedure:

    Step 1. Start Notepad or another text editor.

    Step 2. Copy the following text from this page and paste it into your text editor (everything between the square brackets should be all on one line):

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

    Step 3. Save the file with a name like NoAutoRun.reg, taking care to include the .reg extension.

    Step 4. Right-click your .reg file and choose Merge. Confirm any warning prompts to add the information to the Registry.

  92. jeff

    It didn’t work after I clicked “apply”. Fortunately Kaspersky caught the bastard on the external drive. I then OK’d and closed the window and got a Kaspersky pop-up warning me of a mmc change which I OK’d. I removed the external drive, but when I put it back on it still did an auto-play.

  93. jeff

    the suggestion by “Crow” worked.

  94. chaidir_yassin

    thanks Scud.. you’re my hero…

  95. aph7six

    This is a useful link, maybe answers some of the different behaviors seen by some people:

    http://support.microsoft.com/kb/967715/

    Long, but with good links in it.

  96. Eddie

    SweBee

    u r the the best thanks alot
    Ur solution works like magic

    thanks

  97. Bobsta

    Hey Guy’’s,just a beginner here,Im a little confused on all the above.
    I need to disable auto play only for 3 wireless modem,is this possible,do not want to disable
    everything else,please help,maybe I’ve missed something.Cheers!!!

  98. Bobsta

    Sorry,I posted comment May 18,2009 5:46AM,WRONG EMAIL ADDRESS
    Windows Vista,need to remove autoplay only for wireless usb drive,
    not all drives ,is this possible!!

  99. Nick

    apart from autorun blocking, if you want to completely block a usb drive or ipod or digital camera of others but allow only yours on your laptop or pc you can try usb security products, some of them are upcopy and uhook personal 2.1

  100. ankur banik

    thanks


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.