How to disable Autorun

Thursday, October 7, 2010

Whenever you insert a USB drive, CD/DVD, etc into your system, Windows automatically launches an Autorun dialog box which allows you to select an action from the given list. You can browse the content, play media files, etc using Autorun dialog box.

Sometimes you might find the Autorun functionality annoying and might want to disable it permanently. Today, I'm going to share with you a little trick to disable the Autorun functionality.


1) Open Notepad

2) Paste the following code in Notepad

Windows Registry Editor Version 5.00

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

3) Replace the red text to any of following value according to your requirements:
FF - To disable AutoRun on all drives
20 - To disable AutoRun on CD-ROM drives
4 - To disable AutoRun on removable drives
8 - To disable AutoRun on fixed drives
10 - To disable AutoRun on network drives
40 - To disable AutoRun on RAM disks
1 - To disable AutoRun on unknown drives
4) If you want to disable Autorun on a combination of drives, you'll need to calculate sum of the values. For example, if you want to disable Autorun on CD-ROM drives and removable drives, you'll need to set the value to 20 + 4 = 24.

5) Save is as disableautorun.reg

6) After you have save it, double click the file. Done.

P/S : If you want to disable Autorun functionality for all users in your system, use the "HKEY_LOCAL_MACHINE" instead of "HKEY_CURRENT_USER"

If you want to restore the Autorun functionality, paste the code below in Notepad

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=-

Save it as restoreautorun.reg and double click the file