To disable it one drive letter at a time:
ZYXWVUTSRQPONMLKJIHGFEDCBA00000000000000000000000000
This chart above is important and the key to this process. It is in binary code.
Copy it into notepad for editing. Under the letter you want to disable, change it from 0 to 1.
0 means enabled. 1 means disabled.
- Open calculator. Click the menu "View | Programmer".
- On the left of the 4 bubbles, select "Bin" (for binary).
- Now copy and paste the binary numbers from notepad into calc.exe
- Now click the bubble "Hex" (to convert to hex).
- Copy the result (or remember).
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
On the right side, you should see a bunch of stuff already there.
Click the menu "Edit | New > DWORD (32-bit) Value"
Give it the name: NoDriveAutoRun
Enter the value from calc.exe (and make sure the bubble is on Hex)
DONE!
To disable it for one Type of drive:
There is another method that disables it for an entire type:
(Removable (USB flash or HD) / Non-Removable (HDD) / Network / CD-DVD / RAMdisk).
The process is the same as above, in the same registry location but the entry is called:
NoDriveTypeAutoRun
Using the chart below, change the appropriate column from 0 to 1, and follow steps 1-5 shown above.
00000000
Using the chart below, change the appropriate column from 0 to 1, and follow steps 1-5 shown above.
00000000
Bit number | Bit pattern | Drive type |
2 | 00000100 | Disk that can be removed from the drive (such as a floppy disk or USB flash drive) |
3 | 00001000 | Disk that cannot be removed from drive (usually a hard disk) |
4 | 00010000 | Network drive |
5 | 00100000 | CD/DVD drive |
6 | 01000000 | RAM disk |
Notice the 3rd column is Bit #2 because binary starts with 0. Bit #1 does not seem to exist.
(not listed above, Bit #0 and Bit #7 controls Disables AutoRun on drives of unknown type.)
The default is 0x00000091 (91 Hex) or "145" (Dec) or "1001 0001" (Binary)
Meaning by default, unknown types and network drives are disabled, and everything else is enabled.
Cheat Sheet:
(not listed above, Bit #0 and Bit #7 controls Disables AutoRun on drives of unknown type.)
The default is 0x00000091 (91 Hex) or "145" (Dec) or "1001 0001" (Binary)
Meaning by default, unknown types and network drives are disabled, and everything else is enabled.
Cheat Sheet:
Value | Description |
91 | AutoRun is enabled for CD/DVD drives and USB flash drives |
95 | AutoRun is disabled for USB flash drives |
B1 | AutoRun is disabled for CD/DVD drives |
B5 | AutoRun is disabled for CD/DVD drives and USB flash drives |
To disable it for everything:
Follow the process for "type" and use the same key ( NoDriveTypeAutoRun )
If you want to disable all the types listed above:
Use the bit-mask "01111100" in binary, or "7C"(Hex) or "124" (Dec)
If you want to disable EVERYTHING (even drives with an unknown type):
The bit-mask "11111111" in binary, or "FF" (Hex) and "255" (Dec)
Just fill in this hex code into the NoDriveTypeAutoRun entry.
Theoretically Autoplay would never show up again.
Enjoy.
Sub-Note: The NoDriveTypeAutoRun subkey value in registry has higher priority than the setting in the "Control Panel > AutoPlay Options".
So if AutoRun for a drive is disabled via NoDriveTypeAutoRun then you can not enable it by using the Control Panel.
So if AutoRun for a drive is disabled via NoDriveTypeAutoRun then you can not enable it by using the Control Panel.
Side Note: Apparently, you can edit the same location in HKEY_LOCAL_MACHINE to make it machine wide, instead of per-user.
No comments:
Post a Comment