How to deny access to a drive in Windows 10

How to disable access to drives in Windows. 

One of ways to  make disable access to drives in Windows (all Windows, Windows 10, Windows 8, Windows 7, also Windows server.. ), you can use Group policy editor.

Below are  the steps:

1. Press Windows + R (to open Run command), write gpedit.msc at Run column, then hit Enter or click OK.





2. In Local group policy editor window, Navigate to User Configuration > Administrative Templates > Windows Components > File Explorer.


3. At right window choose/click: Prevent access to drives from My Computer.
4. At Prevent access to drives from My Computer window choose Enabled. Then click Apply, click OK.



Now if you try to access drives (C, D, E etc) also external drives or flash drive, there will be the warning : This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.


To make it back to normal, at step 4, choose  Not Configured.