How to prevent local disk access for specific users in Windows 10. – wintips.org

If you have a Windows computer that you share with other people, you can prevent access to local drives or specific folders for a specific user account or for everyone.

Imagine the following scenario: All your important files are on your computer’s secondary internal drive, and you don’t want other people to see or delete them.

In this article, we will find detailed instructions on how to restrict access to a local drive (or folder) for all or specific users in Windows 10. (The instructions apply to all versions of Windows).

How to prevent users from accessing the local drive in Windows 10.

  1. Ban specific users from accessing Drive.
  2. Prevent access to Drive for all users in Registry Editor.
  3. Prevent access to Drive for all users using Group Policy

Method 1: How to prevent specific users from accessing a disk or folder.

The first and best way* to deny access to a drive/folder is to change user permissions in the drive/folder properties.

*Note: This is the best method because it allows you to prevent only certain users from accessing the contents of a disk block or folder. All other methods listed here prevent access to all users (including you).

To allow specific users to access the contents of a folder/disk:

1. In File Explorer, right click select the drive you want to deny access to specific users and click on it Characteristics.

image

2. select Security tab, then click Editing button.

prevent access to the driver

3. press Add to select the user you want to prevent from accessing your drive.

prevent local disk access

4. Type the username* select the username you want to restrict access to and click to confirm Check the names. Then choose OK. *

*Note: You must know the correct username of the account you want to restrict. An easy way to see users on your PC is to look at the profile folder names under the “C:\Users\” folder.

image

5. Come in now Permissions for the local disk window, Select the user you added and in Permissions section, sign rejection, restrict access to Full control. Choose now Please apply >> OK.

image

6. press Yes when prompted to apply permissions and then close all windows.

image

7. At this point, you have prevented a specific user from accessing the selected drive. If you want to restrict access to more users, follow the steps above.

Method 2. How to prevent all users in the registry from accessing the local drive.

The next way to prevent users from accessing the local drive in Windows 10 is to use the registry. *

*Note: Use this method only if you want to prevent access to all users (including you).

Important: Making the wrong registry changes can seriously damage your device and require you to reinstall Windows. Therefore, be careful when making changes to the registry editor and always back up the registry before making any changes.

1. click on Windows clip_image001 and R buttons to open Running command window.
2. Type regedit and beat Enter: *

*Note: If you see a User Access Control (UAC) warning box asking for permission, click on it Yes.

clip_image007

3. In the registry editor, navigate to the following path:

1. In the registry editor, navigate to the following path:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

4. Right click to the space on the right and select new > A DWORD (32-bit) value.

Prevent users from accessing the local disk

3. Type NoViewOnDrive as the new DWORD name, then click Enter.

prevent users from accessing the disk registry

4a. Double click when newly created NoViewOnDrive select the value and select Ten In the basic options.

4b. Now change the value data to the number corresponding to the drive letter according to the table below and click OK.*

For example, to hide the “E:” drive, enter “16” in the “Value data” field.

image

*Note: See the table below to find value information for each drive letter.

Driving letter Value information Driving letter Value information
A 1 N 8192
B 2 O 16384
C 4 P 32768
D 8 Q 65536
E 16 R 131072
F 32 S 262144
G 64 T 524288
H 128 SHE IS 1048576
I 256 V 2097152
J 512 V 4194304
K 1024 X 8388608
L 2048 Y 16777216
M 4096 Z 33554432

5. When done, near registry editor and restart your PC to apply the change.
6. After restarting, every user who tries to access the drive receives the error:

“This operation has been canceled due to restrictions on the computer. Please contact your system administrator.”

*Note: To remove the access restriction, open the registry editor again and turn off the NoViewOnDrive The DWORD value in the registry mentioned above and restart your personal computer.

Method 3: How to prevent local disk access using Group Policy.

Alternatively, local group policy is also effective for restricting user access to the local drive. Compare with the registry editor, there is a limited number of drive letters that can be restricted by group policy.

*Notes:
1. To use the Group Policy method, you must be running Windows 10 Pro/Enterprise/Education edition. Local Group Policy is not available in Windows 10 Home.
2. Use this method only if you want to prevent access to all users (including you).

1. press at the same time Windows image + R Buttons to open the Run command window.
2. Enter in the text field of the dialog box gpedit.msc and beat Enter To open the Group Policy Editor.

clip_image008

3. In the Group Policy Editor, navigate to the following path.

  • User Configuration -> Administrative Templates -> Windows Components -> File Explorer

4. On the right side double click to open Deny access to drivers from my computer politics.*

* Information: This policy prevents users from using My Computer to access the contents of selected drives. If you enable this setting, users can view the directory structure of selected drives in My Computer or File Explorer, but they cannot open and access folders. They also cannot use the Run dialog box or the Map Network Drive dialog box to view the directories on these drives.

image

4. Select in the new window that opens Enabled and from the drop-down menu below options, select the drive letter* you want to hide. Click when done Please apply and OK.

*Note: If you don’t see the drive letter you want to hide, use one of the methods above because group policy doesn’t allow hiding all drives/letters. (Yes, this is another good job from MS!)

prevent users from accessing the driver group policy

5. Close the Group Policy Editor.

6. Register now To check if you can no longer access the drive with a File Explorer error:*

“This operation has been canceled due to restrictions on the computer. Please contact your system administrator.”

*Note: To restore access to the drive, reopen the Group Policy Editor and install the policy Prevent access to drivers from my computer for Not configured.

That’s it! Which method worked for you?
Let me know if this guide helped you by leaving a comment about your experience. Please like and share this guide to help others.

If you found this article useful, please support us by donating. Even $1 can make a big difference for us We continue to help others while keeping this site free:

Leave a Comment