My Hide Your Drives Sample is a HTML Application (file extension HTA) file that can update the "NoDrives" value in the registry that specifies drives to be hidden. The following MS KB articles describe "NoDrives" value.
This sample is written assuming the Windows version is 2000 or above. I don't know if it will work for Windows NT. The sample will do the following:
Note that by default, Administrator privileges are required to update the "NoDrives" value.
The script is actually a (Windows) script version of an article from a TechTV (now called G4techTV?) show. (The article seems to be currently missing from their web site. When it returns I will link to it.)
When you click on the link above, you should have the opportunity to download it (the HTA file). To execute the application, after downloading, just open the file by double-clicking or whatever. A HTML Application (HTA) file has more access to a system than a HTML file does, which means that we don't get prompts asking for permission to use things such as ActiveX controls. The HTA file has automatic permission to do things that other applications (such as an EXE) can do.
See my Visual C++ Programmer Stuff page for more C++ stuff.