How to prevent access to select drives using Registry

You can disable access to select drives for a user using the Registry. Create a REG_DWORD value named NoViewOnDrive under
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersion
PoliciesExplorer
and enter its value as follows. You must select decimal first and then add the following values to disable respective drives.

Registry Key added under HKEY_CURRENT_USER

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.

To add the restriction to all users on the Compter just make the same key under
HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER. If somebody tries to access a drive on which restriction is imposed this error will be shown “The operation has bee cancelled due to restrictions in effect on this computer“.

Please backup your registry before editing it so that you can disable any changes made. If you want to prevent copying of your data to a USB drive here is how you can do it.

If you enjoyed this article, you might also like...