In the left pane, select “Settings”.
Select “Account”, then “Family & Other People I Choose”.
Click the “+” button under “People Who Can Use This Computer”.
Enter the email address of the person whose access you wish to restrict.
Select the checkboxes next to each user account you wish to prevent from accessing the folder.
Click OK.
To prevent specific users from accessing a particular file or folder, you must know the exact username. If you are looking to restrict access to a folder or drive for a specific user, follow these steps:
1. Enter the name of the user or group into the text box and select the checkbox next to it.
2. Click OK.
3. Select the folder or drive where you want to apply the restrictions and click Apply.
4. Repeat Steps 2–4 for each user or group that needs to be restricted.
5. Restricted users cannot see the contents of the folder or drive unless they enter the correct password.
This method prevents users from accessing local drives on Windows 10 without logging into an account, even if they are logged into another account. If you want to allow access to local drives for everyone, simply delete the value named “LocalAccountRestrictedToDomain”.
The registry key location depends on the version of Windows you use. For example, it is located under the following paths:
Windows 7: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon
Windows 8/8.1: HKEY_LOCALSERVICES\Control Panel\Desktop\File Sharing Settings
Windows 10: HKEY_CURTURESOFTWAREPOLICIES\Security Settings\LanmanServer\Parameters\LocalAccountRestrictedTodomain
If you do not see the above keys, make sure that you have installed the latest update for Windows 10.
You must run the program as administrator.
There is a risk of deleting critical system files if you don’t understand how to work with the registry. Backup the entire registry before changing anything.
In this tutorial we will show you how to use Group Policy to control access to a local drive. In this example we will be restricting access to a USB flash drive called “MyFlashDrive”. We will be doing this by denying access to the drive itself, and by preventing users from accessing it directly via Explorer.
1. Click OK.
2. Navigate to Computer Configuration\Administrative Templates\System\Group Policies\Restricted Drives. Double-click on the policy named “Deny access to restricted folders and removable media”.
3. Select Enabled from the dropdown menu next to the policy name.
4. Click Edit.
5. Under “Select the objects to include”, select “All NTFS volumes”.
6. Click Apply.
Tim Wiley was a tech writer for seven years at Recode. In that time, he covered everything from basic browser.js and URL parameters to XHRs, performance, malware, security, enterprise apps, social media, and Windows secrets. He also written about how to hack Signal in 2016 and how to resist, or possibly even conquer, the zero-day threat.