If we do not want others to have access to our drives, such as system disk C drive, CD-ROM, we can follow the below steps to achieve the results.
Step One: Enter “gpedit.msc” in the Start menu’s search dialog box to open the “Local Group Policy Editor” settings window.
Step Two: In the “Local Group Policy Editor” settings window, click to open the “Local Computer Policy → User Configuration → Administrative Templates → Windows Components → Windows Explorer” option.
Step Three: In the right settings window, select the “Prevent access to drives from My Computer” entry, right-click on this option, select “Edit” to open a “to prevent from My Computer to access the drive properties” settings window. There are three options, namely, “not configured”, “Enabled”, “Disabled”
Step Four: If we want to limit the use of a drive, just select “Enabled” and then select the drive in it.