That is done thru Windows Group Policy.
Look in User Configuration | Administrative Templates | Windows Components | Windows Explorer | Hide these specified drives in My Computer
Look in User Configuration | Administrative Templates | Windows Components | Windows Explorer | Prevent acces to drives from My Computer