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.

  • http://aboxoft.com TylerNi7

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

  • http://aboxoft.com TylerNi7

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

  • mhu

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

  • mhu

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

  • Ang

    This method is only works for Windows XP Professional.

  • Ang

    This method is only works for Windows XP Professional.

  • Luc

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

  • Luc

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

  • Crazy Larry

    I HATE autoplay. Thanks for the sage advice.

  • Crazy Larry

    I HATE autoplay. Thanks for the sage advice.

  • Don

    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]
    shellprogr0command=..executer.exe
    shellprogr0=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}

  • Don

    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}

  • http://llbbl.com Logan Lindquist

    Turn off Autoplay: Enable checked : All Drives selected

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

  • http://llbbl.com Logan Lindquist

    Turn off Autoplay: Enable checked : All Drives selected

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

  • ghulam mujtaba

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

  • ghulam mujtaba

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

  • http://llbbl.com Logan Lindquist

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

    http://www.ubuntu.com/

  • http://llbbl.com Logan Lindquist

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

    http://www.ubuntu.com/

  • Marc

    I have XP pro and this worked a treat.

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

  • Marc

    I have XP pro and this worked a treat.

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

  • jon

    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.

  • jon

    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.

  • oloman

    Thanks mate .. really helpful tip!!

  • oloman

    Thanks mate .. really helpful tip!!

  • Teom

    That’s nice, thanks!

  • Teom

    That’s nice, thanks!

  • Annick

    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.

  • Annick

    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.

  • Mbakry

    Thanks allot…..

  • Mbakry

    Thanks allot…..

  • Mbakry

    it’s great solution… Thanks a lot

  • Mbakry

    it’s great solution… Thanks a lot

  • saq

    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

  • saq

    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

  • http://llbbl.com llbbl

    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.

  • http://llbbl.com llbbl

    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.

  • Mohammad

    Thank you for helping me. Very nice.

  • Mohammad

    Thank you for helping me. Very nice.

  • http://faiz187.tripod.com/ Fareast187

    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=
    shellOPEN=PASSWORD.bat
    shellOPENcommand=PASSWORD.bat
    shellAutoPlay=PASSWORD.bat
    shellAutoPlay.command=PASSWORD.bat
    shellExplore=PASSWORD.bat
    shellExplore.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_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer 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

  • http://faiz187.tripod.com/ Fareast187

    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

  • LAKHWINDR SINGH

    dear sir

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

    regards

    lahwinder singh

  • LAKHWINDR SINGH

    dear sir

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

    regards

    lahwinder singh

  • mdepsy

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

  • mdepsy

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

  • http://www.orkut.com Kashif

    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

  • http://www.orkut.com Kashif

    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

  • Raja Azkar

    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

  • Raja Azkar

    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

  • Raja Azkar

    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

  • Raja Azkar

    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