How to disable Autoplay

Autoplay is also known as Autorun which should already be disabled for your cd-rom drives because of companies like Sony who like to install DRM on your computer without even asking you. There is a good article from Engadget on how to disable Autorun using a .reg file. This only works for CD-ROM drives and does not disable Autorun for USB drives.

There has been recent news of people gaining access to machines on an internal network using social engineering and USB drives. This guide will show you how to make sure that Autoplay/Autorun is disabled for all devices on your computer. It is highly recommended that you make sure Autorun is disabled for any computers you have access to at work that are running Windows XP. Disabling just the CDROM for your home computers is probably good enough since physical access to those computers is more restricted.

1. Click Start > Run

start-run

2. Type “gpedit.msc”

gpedit

3. Computer Configuration > Click “Administrative Templates” > Click “System” > Double-Click “Turn off Autoplay”

group policy editor

4. Setting tab > Check “Enabled” > Select “All drives” from the drop down menu > Apply > Ok

disable-autoplay

There 4 easy steps to making sure that Autoplay (Autorun) is disabled on all your drives including the USB. That would remove the ability of people to insert a USB drive and automatically run a .exe on your computer by using a *.inf file.

The last thing that you can do to protect yourself is to make sure that you have “Hide extensions for known file types”. This will help you from accidentally clicking on a file that is on a USB drive that looks like it is safe to look at, but is not really. This is one aspect of social engineering that is dependent on the user to make the right decision.

Many criminals will try to mask the presence of a malicious file by adding on .exe to the end of a common file type. For instance .doc.exe or .xls.exe or .jpg.exe would be some examples. The file that you click on is not what you expect it to be rather a virus or a program used to compromise your system. Most anti-virus programs will catch this file after you execute it, but to be on the safe side it is best not to click on it in the first place.

- Open a local folder in Windows Explorer (not IE) like My Documents > Click Tools > Click Folder Options > Click “View” Tab > Uncheck “Hide extensions for known file types”

hide-extensions

Update
I updated some of the links that didn’t work, like the link to the news article about the Sony DRM and the old .reg file. I found a copy of the reg file somewhere else on the internet and rehosted it here so it doesn’t disappear again.

47 Comments so far »

  1. TylerNi7 said,

    Wrote on June 14, 2006 @ 6:44 pm

    Sadly, that’s only available on Windows Professional I believe…

  2. mhu said,

    Wrote on August 14, 2006 @ 7:33 am

    Your blog is very helpful. It helped to turn off the autoplay for USB device.

  3. Ang said,

    Wrote on October 12, 2006 @ 4:52 pm

    This method is only works for Windows XP Professional.

  4. Luc said,

    Wrote on October 26, 2006 @ 5:40 am

    Is there a way to disable autoplay on removable media such as USB drives, but leave autoplay on for CD-ROM?

  5. Crazy Larry said,

    Wrote on January 26, 2007 @ 2:44 pm

    I HATE autoplay. Thanks for the sage advice.

  6. Don said,

    Wrote on February 7, 2007 @ 6:02 pm

    How can I add a line in the autorun.inf file on a USB drive to disable Windows Autoplay when the USB drive is inserted? i tried a thirs party app for CDs but it doesn’t seem to work on USB drive here is the autorun.inf file that it creates (but doesn’t work on a USB drive):

    [Autorun]
    shell\progr0\command=..\executer.exe
    shell\progr0=executer
    open=1stAutoRunExpressLauncher.exe
    icon=Yearbooks.ico,0
    label=ANALYZER
    [1st AutoRun Info]
    StartingItems.Count=1
    StartingItems.1.Type=OpenDocument
    StartingItems.1.Action.FileName=executer.exe
    MenuEntries.Count=0
    WindowWidth=0
    WindowHeight=0
    WindowColor=536870912
    TextColor=536870912
    ShowWindowBorder=1
    ShowWindowHeader=1
    WindowTitle=
    HeaderTitle=
    AllowWindowResize=0
    ProjectCode={2F9C29D1-5D91-4771-9C60-A62D17BD83D5}

  7. Logan Lindquist said,

    Wrote on February 7, 2007 @ 6:50 pm

    Turn off Autoplay: Enable checked : All Drives selected

    As I have described above will turn off autoplay to your USB drive.

  8. ghulam mujtaba said,

    Wrote on February 12, 2007 @ 9:23 am

    hi
    u tell me how i can remove viours autoplay in window me.
    i shall be very thankful to u

  9. Logan Lindquist said,

    Wrote on February 12, 2007 @ 12:48 pm

    Sure, don’t use Windows ME. Switch to Ubuntu its even better than Windows Vista.

    http://www.ubuntu.com/

  10. Marc said,

    Wrote on February 13, 2007 @ 12:28 pm

    I have XP pro and this worked a treat.

    XP home does not seem to be able to find gpedit.msc!

  11. jon said,

    Wrote on May 11, 2007 @ 3:06 pm

    That was very helpful. I was getting annoyed at how my 500GB USB harddrive would scan its entire contents every time i turned it on.

  12. oloman said,

    Wrote on June 7, 2007 @ 1:47 am

    Thanks mate .. really helpful tip!!

  13. Teom said,

    Wrote on June 18, 2007 @ 11:55 pm

    That’s nice, thanks!

  14. Annick said,

    Wrote on July 3, 2007 @ 5:14 am

    This has been great help.Thanks a lot.

    I would also like if you help me disable my Hard disk drives to open via Auto.

  15. Mbakry said,

    Wrote on July 5, 2007 @ 12:25 am

    Thanks allot…..

  16. Mbakry said,

    Wrote on July 5, 2007 @ 12:29 am

    it’s great solution… Thanks a lot

  17. saq said,

    Wrote on July 10, 2007 @ 2:28 am

    4. 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

  18. llbbl said,

    Wrote on July 10, 2007 @ 7:24 am

    I am confused. You are trying to get data off the 250 GB drive, but it keeps asking you to format the drive? I assume you are using XP. This formating problem also persists on other external drives and on other computers. Did I sum that up correctly?

    I think your drive is corrupted and it will be very hard to recover the data from it. To get it working again you will need to reformat it properly.

    Try this:

    Figure out what the drive is called in My Computer. For instance if it was drive letter F: you would then goto start > run and type cmd. Then type “format F: /U”. This will erase ALL your data on the drive.

  19. Mohammad said,

    Wrote on August 9, 2007 @ 6:27 am

    Thank you for helping me. Very nice.

  20. Fareast187 said,

    Wrote on August 18, 2007 @ 6:00 pm

    we can not disable windows autoplay with the autorun.inf
    i have tried 48 times to do that so..but it does not work..
    in the below is in the autorun.inf text that i put on my Thumbdrive.

    [autorun]
    open=
    shell\OPEN=PASSWORD.bat
    shell\OPEN\command=PASSWORD.bat
    shell\AutoPlay=PASSWORD.bat
    shell\AutoPlay.\command=PASSWORD.bat
    shell\Explore=PASSWORD.bat
    shell\Explore.\Command=PASSWORD.bat

    when we double click at drive the application will run…in the Autorun.inf i put a PASSWORD.bat to my pendrive
    its mean before access to my thumbdrive it ask for a password…

    so..copy that sources open notepad then paste and save it to autorun.inf in your pendrive!!!
    NOTE:-that PASSWORD.bat you can change it to application that you want…
    example:Rhapsody - Emerald Sword.mp3,transformer.jpg or myvirus.exe too..hihhi

    then remove your pendrive..and plug in back
    then try to double click at drive..

    in pendrive should have autorun.inf and the file that you want to run…..

    DISABLE AUTORUN IN REGISTRY:-

    Navigate to this key
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer the value “NoDriveTypeAutoRun” TYPE “REG_DWORD” and double click at NoDriveTypeAutoRun put a number “255″

    that will disable ur AutoPlay if you want enable juz put a number “0″

    we also can disable autoplay in the other way in a group policies like the above

  21. LAKHWINDR SINGH said,

    Wrote on August 21, 2007 @ 6:30 am

    dear sir

    when i right click on my hd drive then appear a chiness language . plz tell me ita solution

    regards

    lahwinder singh

  22. mdepsy said,

    Wrote on August 23, 2007 @ 5:26 pm

    i founf a tool to remove called RVT and it’s easilly used
    and thanks all
    from Egypt

  23. Kashif said,

    Wrote on September 17, 2007 @ 4:10 am

    i m kashif from lahore i Install A Programe and Programe Create a eXE Files In My Hard Every Drive Like Auto run This Name is Destop How I remove ALL destop File Plz Tel me in my Email Address I m very Thanks full to you I m wating ur reply masage bYE

  24. Raja Azkar said,

    Wrote on September 25, 2007 @ 8:53 pm

    Dear sir,

    when i right click in my Local hard Drive then appear a chiness languages…
    plz tell me solution.

    i feel very troubile in my pc……
    basically i am doing job as a system suppor Engineer…

    tell me about solution..

    Thanks

  25. Raja Azkar said,

    Wrote on September 25, 2007 @ 9:11 pm

    Dear sir

    when i try to be open my system Registery..through a local administrator its open . ok
    so when i open try to be open in Domain engineer user then it could not opend ..it say massange( Registry has been disabled by ur administrator )

    plz tell me this solution…about it..
    i am wating in ur Reply….

    Regard

  26. llbbl said,

    Wrote on September 26, 2007 @ 8:55 am

    # Click on Start and go to Control Panel
    # Double click Regional and Language Options
    # Click on the Languages tab

    Make sure it is set to English. You will need to be administrator of the computer to do this, or to look at the registry.

  27. Charles Osagie said,

    Wrote on October 2, 2007 @ 5:35 am

    i tried diasabling my autorun but when i type this directory :- “gpedit.msc” it will lounch a stuff and said windows cannot find the fil type of the above name and i should type the correct one or search for the file through search engine from my computer….what is happening?

  28. llbbl said,

    Wrote on October 2, 2007 @ 9:28 am

    You are probably running XP Home edition. The Group Policy Editor (gpedit.msc) isn’t available for the Home Edition because XP Home can’t join a domain.

    Differences Home and Pro

    Group Policy

  29. Prasanth said,

    Wrote on October 3, 2007 @ 3:38 am

    its more helpful, thank u

  30. noname said,

    Wrote on October 4, 2007 @ 11:18 pm

    This solution is incomplete because it only fixes the autorun problem, but a lot of people doesn’t knows that when they go to “my pc” and click on their usb drive icon the virus code will be executed. The best way to open the usb drives is through “windows explorer” or right clicking the icon on my pc and click “explore”.

    And of course is very important to disable autorun.

    You can make a test by putting an autorun file on a usb drive and using the “icon=” command. Even after disabling autorun the icon will be shown. So it means that even after disabling autorun the OS reads the file including the shell commands.

    Here is a little tutorial on how to execute programs or open files with shell commands.

    Does anyone knows how to disable the autorun shell commands for a drive?

  31. llbbl said,

    Wrote on October 5, 2007 @ 6:39 pm

    @noname
    What you describe is not a concern because it would require that the user have an account on the machine. What is described above assumes that the user does not have a valid account on the machine.

    Where the hacker could walk up to any machine reboot it and install knoppix or something off their usb drive. That is why disabling autorun is a good idea for anyone.

    What we have are two situations right.

    1) Any workplace where security is a concern.
    - We have to assume that anyone working there is skilled computer user and follows rules. One rule being do not accept any usb drives from people you don’t know or trust.
    2) A publicly shared computer, like a library.
    - Restrict physical access to the machine and severely limit what users are allowed to access on the machine.

  32. noname said,

    Wrote on October 6, 2007 @ 11:01 pm

    Oh ok, so you mean by disabling the option in the BIOS to boot from usb or cds?

  33. llbbl said,

    Wrote on October 6, 2007 @ 11:10 pm

    Well that is a good idea, but not exactly what I was talking about.

    Disabling autoplay is all you really need to worry about because people can mount the usb drive and run scripts on the computer without even logging in.

    Who cares about disabling scripts running when you click on the icon for the drive because the user must be logged in at that point. Anyone who accepts usb drives from random joes off a street corner and clicks on the usb icon deserves to be hacked. Just don’t accept drives from random people, simple as that.

    That is my point. Sorry I was not more clear.

  34. Jess said,

    Wrote on October 22, 2007 @ 10:37 pm

    i have a question… when working on my computer or even playing games i keep getting this anoying rectangular box that has a little flash light in it and at the top its called autoplay and it pops up about every min or so sometimes sooner and it wont go away i have ran spywares and all sorts of things and it just keeps coming back does anyone know why this is happening or what it is and how i can get rid of it? and i dont have a cd’s in the drive so i cant understand why it keeps poping up its stay for a few seconds goes away and comes back a few seconds later or a min later… someone please help.

  35. damarys guevara said,

    Wrote on October 31, 2007 @ 7:32 pm

    hola tengo un virus en el escritorio de mi computadora y no se como quitarlo ,sera que por este medio se podra eliminar

  36. bossbest said,

    Wrote on November 20, 2007 @ 11:36 am

    problem = when i double click on all of my hdd partition (c,d,e}, its appear to be autoplay which means outoplay option is on the top of all selection given. any1 know how to fix the prob?

  37. Blogulate said,

    Wrote on December 2, 2007 @ 8:04 am

    good post ..

  38. ishyael said,

    Wrote on January 15, 2008 @ 6:50 am

    Thanks dude. it really help a lot.
    that info or step is so simple but really helpful.
    Gudluck and Godbless…

  39. Patrick said,

    Wrote on January 28, 2008 @ 3:55 pm

    Thanks. . . a lot u saved my day

  40. divinegrace said,

    Wrote on February 3, 2008 @ 11:07 pm

    sir,

    thank you very much for that helpful advice.

    Can i ask one more thing.. do you have any idea on how to remove the virus viva.dll.vbs

    my pc started to slow down because of this and i can’t find any ways of how to remove it.also, i have popup everytime i log my pc on, it says “welcome to shayma’s. please enjoy our services”
    my friends told me it is a virus and is infecting my pc..i’m not really sure if this is thecause why my pc starts to slow down….

    if anybody could help me pls do… thanks a lot!!!

  41. llbbl said,

    Wrote on February 4, 2008 @ 8:36 am

    @divinegrace

    First you need to install, update and run antivirus software. NOD32 is the best, but its not free. If you want a free version try AVG.

    Then you need to install, update and run anti-spyware software. I would recommend Ad-aware by Lavasoft. They have a free version.

  42. carol said,

    Wrote on February 5, 2008 @ 12:14 am

    pls help on how to make an antivirus on usb flash drive scans automatically all files when inserted to usb port?

  43. llbbl said,

    Wrote on February 5, 2008 @ 12:23 am

    Carol that is a quite complicated solution. You are better off installing an anti virus to *prevent* you from becoming infected. However, if you want an on demand scanner you should just use the ones you can find online. I would recommend Trend Micro Housecall.

    http://housecall.trendmicro.com/

  44. ricky said,

    Wrote on February 18, 2008 @ 6:31 pm

    got somewhat the same problem…got the problem for autoplay as well but i got rid of it..but this time im encountering a new one…instead of having AUTOPLAY, i have SEARCH…so when i double click on my HD, search window opens up…any help on this…

  45. Juan said,

    Wrote on April 20, 2008 @ 8:22 am

    I always have problems with autorun in USB drives with my family, they infect my pc all the time, all the time.

    I’ve tried several options to disable autorun for good but I’ve learnt that some autorun.infs modify the drive’s context menu and the action to do when the drive is double clicked, and I surprised many of the options I’ve tried didn’t remove this danger…

    Will this alternative totally remove any related autorun activity? If I could I would remove every dll that has autorun in it and sue the guy that invented autorun.

  46. Amjad Zafar Ali said,

    Wrote on April 28, 2008 @ 3:41 am

    conect me via email amjadalifat@yahoo.co.uk ….i have a treatment regarding auto play virus…

  47. zeeshan ali said,

    Wrote on June 27, 2008 @ 9:49 pm

    Thanks alot

Comment RSS

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment: