There are cases where certain drives needs to be hidden in order to not be accessed from the users because you just don’t want them to mess up with the data saved in these drive. But unfortunately, there is no specific setting or command in Windows that can do so. The only way seems to be through the group policy.
First, open Local Group Policy Editor by simply typing “group policy” in the search box from Start menu, and clicking on Edit group policy from the list.
Then, go to User Configuration -> Administrative Templates -> Windows Components -> Windows Explorer, and open the setting called Hide these specified drives in My Computer.
In the detail setting window, set option to Enable first, and pick drives that you want to hide from the drop down list under the option section.
Once you clicked on OK or Apply button, the setting takes effect pretty much right away. Note that by default it only provides you 4 drives to choose. If you have a drive letter that’s beyond D that you want to hide, you can modify the system.adm file to make the extra drive letters to show up in Group Policy.
Be careful though when you take these changes because if you don’t do it right you might lock yourself down as well. The Local Group Policy settings affect all local users, including the local administrator. It’s more designed to be used in a network powered by the Active Directory.