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:
For example to hide the E and F drives, the value would be 48.