How to prevent access to select drives using Registry
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 :
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 :
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.
rianto utomo bole nyontek dari http://www.exnol.com/prevent-access-drive-registry