You may want to learn how to open, backup and edit registry which are explained in an easy to understand fashion in that page. There is another way using Disk Management to disable access to a drive. It is easier and much better than the method explained here. Yet another post explains how you can prevent others from copying data from your PC onto a USB storage device.
You can prevent access to any drive in Windows by creating a DWORD in registry. The advantage of this method is that, a single DWORD can disable access to drives selected by you. In order to try this, you have to open registry (try the introduction post to registry mentioned at the start) and browse to the KEY :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Now rightclick on the right pane and select “New»DWORD (32-bit) Value” and name it NoViewOnDrive

Browse to the specified key and create a new DWORD by rightclicking
The corresponding HKEY_LOCAL_MACHINE key :
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
would probably allow you to apply a system wide restriction. I haven’t tried it yet.
From the following list, find the values of the drives you want to prevent access to. Now add these values together. For example, if you want to prevent access to D drive(8) and J drive(512) you will have 8+512 = 520.
A – 1, B – 2, C – 4, D – 8, E – 16, F – 32, G – 64, H – 128, I – 256, J – 512, K – 1024, L – 2048, M – 4096, N – 8192, O – 16384, P – 32768, Q – 65536, R – 131072, S – 262144, T – 524288, U – 1048576, V – 2097152, W – 4194304, X – 8388608, Y – 16777216, Z – 33554432, ALL – 67108863
If you need to disable access to more than one drive you may add the values corresponding to all those drives and set the value. That is if you need to disable D and F drives add 8 (D)+32 (F) = 40 to the key. Double Click on the NoViewOnDrive DWORD and after selecting Decimal radio button, paste this value.

In this picture I have selected D: drive and E:drive 8+16 = 24
After this step, you just have to close registry editor. The settings take effect immediately. (If this doesn’t take effect try restarting windows explorer) Next time you try to access one of the drives you will encounter and error message as shown below :

Error when trying to access a drive that has been blocked using registry.
Some related articles you may like :
- How to disable access to Drives using Disk Management
- How to view all drives, Disk Management under Windows
- Prevent copying of files to USB drive
- Virus infection by autoplay, how to prevent it
- How to Disable Autoplay/Autorun
- First step to a cleaner and faster Windows – understand the Registry
- Change the default Drive Icons in Windows XP
- Clear the most recently run commands in Run Box from Registry
3 Comments
this method only block acess through explorer…..we can access using CMD..
Hi Joseph, the answer to your comment has been posted as a new post here : http://www.exnol.com/disk-tools/how-to-disable-access-to-drives-using-disk-management
Thank you very much for posting the question.
this method works but unfortunately some softwares (eg ashampoo)managed to access the blocked drives.
if you have any further knowledge to block access to drives, kindly share them with me.
thanx
One Trackback
[...] If you want to prevent access to a drive, read 2nd tip in “Points to note” given after this post or read how to Prevent access to select drives using Registry. [...]