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"
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:
- Get a list of users and allow selection of one
- Create checkboxes for the system's hard rives
- Retrieve the "NoDrives" value for the selected user and for each drive (if
any), set the checkbox to "checked" that is hidden using the "NoDrives" value
- Allow the "NoDrives" value to be updated
Note that by default, Administrator privileges are required to update the
The script is actually a (Windows) script version of an article from a
TechTV (now called G4techTV?)
HTML Application (HTA) Files
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.