iSumsoft » Resources » Windows 10 » How to Prevent Access to Drives from My Computer in Windows 10

How to Prevent Access to Drives in This PC on Windows 10

Isabella Shinn
Isabella Shinn

Updated:

If you have a shared or public computer that several people use, you may be worried about your important data being viewed, tampered with, or deleted. To dispel such concern, it's a good idea to prevent access to certain drives from This PC.

To prevent users from accessing the drive from This PC, one possible method is to use BitLocker to encrypt the drive. However, BitLocker encryption is a time-consuming task. You may not want to do that, and in fact you don't have to. Now, on this page, we will show you two simple and fast ways to prevent access to drives from My Computer in Windows 10.

Way 1: Prevent access to drives in This PC using Group Policy

Step 1: Open the Run dialog box using Win + R, type gpedit.msc, and then click OK. This will open Local Group Policy Editor.

open local group policy

Step 2: Once the Local Group Policy Editor opens, navigate to User Configuration > Administrative Templates > Windows Components > File Explorer. Select the File Explorer folder on the left pane, and then double click the setting titled "Prevent access to drives from My Computer" on the right pane.

prevent access to drives in my computer

Step 3: Select the Enabled radio button, select the drive or drive combinations you want to prevent access to, and then click Apply.

select Enabled

Changes will take effect immediately without restarting Windows 10. Then if the user tries to access the drive from This PC, he will be blocked and get an error message as shown in the figure below.

error message

If you want to allow access to the drive, just open that policy setting and set it to Not Configured or Disabled.

Way 2: Prevent access to drives from This PC using Registry Editor

Step 1: Open the Run dialog box, type regedit, and then click OK. This will open Registry Editor.

open registry

Step 2: Once the Registry Editor opens, navigate to the key Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer on the left pane.

Tips: If the Explorer key does not exist, you can right-click on Policies and select New > Key to create a new key. Then name this new key Explorer.

Step 3: Right-click the Explorer key on the left pane, and select New > DWORD (32-bit) Value. Then name the new value NoViewOnDrive.

create new value

Step 4: Double-click the NoViewOnDrive value, set its value data to 4 (to prevent access to C drive), or 8 (to prevent access to D drive), or 67108863 (to prevent access to all drives), and then click OK to save the changes.

Tips: If you want to prevent access to C drive and D drive, set the value data to 12 (4 + 8).

change value data

Step 5: Close the Registry Editor and restart Windows 10 for the changes to take effect.