Restrict User Access to the contents of selected drives via registry: NoViewOnDrive

The "NoViewOnDrive" value uses a 32-bit bitmask to define local and network drive access for each logical drive in the computer. The lower 26 bits of the 32-bit word correspond to drive letters A through Z.

Drives are visible when set to 0 and hidden when set to 1.

Registry Settings

User Key: [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPolicies
Explorer]
System Key: [HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionPolicies
Explorer]
Value Name: NoViewOnDrive
Data Type: REG_DWORD (DWORD Value)
Value Data: 32-bit bitmask

 

This setting has to be done only as administrator even for the HKCU context.

 

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

For example to hide drive A and drive D, you would add 1 (A) + 8 (D) which means the value should be set to "9".

To disable all the drives set the value to "67108863".

Restart Windows for the change to take effect.

 

When you set this registry policy, users trying to access the restricted drives will receive below restriction message prompt:

 

[Window Title]

Restrictions

[Content]

This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.

[OK]

 

image

0 thoughts on “Restrict User Access to the contents of selected drives via registry: NoViewOnDrive

  1. i can disable the noviewondrives on cu_local_machine but
    how to disable the noviewondrives in hk_local_machine?

Leave a Reply

Your email address will not be published. Required fields are marked *