Open run and type regedit then goto
HKEY_CURRENT_USER -> Software -> Microsoft -> Windows -> CurrentVersion -> Policies Explorer
On right side create a new DWORDÂ and give a name as NoDrives
To calculate the value, add up the following codes for the drives that you want.
To hide drives give the corresponding drive value for that DWORD u created:
A=1
B=2
C=4
D=8
E=16
F=32
For example to hide the E and F drives, the value would be 48.