How to Hide Drives on NT 4.0 TSE and Win2k
(This will need to be done on all servers)
" Copy the "HideDrives.vbs" file into the "S:\WINNT\Application Compatibility Scripts\" folder. This file runs every time a session is started on the Terminal Server.
" Add the "call %SystemRoot%\Application Compatibility Scripts\HideDrives.vbs"" to the RootDrv.Cmd file and save it.
" If you need to modify which drives need to be visible or hidden, launch the "hidedrive.xls" to determine the appropriate registry value.
" Modify the number in the following line everywhere it appears in the "HideDrives.vbs" file.
This is the line in hidedrives.vbs. Just modify the NUMBER to match what hidedrive.xls tells you.
objShell.RegWrite RegPath & "\NoDrives", "123456789", "REG_DWORD"
DRIVE HIDDEN? Binary Selected
Letter 1/0 (1/0)*Binary
A 0 1 0
B 1 2 2
C 0 4 0
D 1 8 8
E 1 16 16
F 1 32 32
G 1 64 64
H 1 128 128
I 1 256 256
J 1 512 512
K 1 1024 1024
L 1 2048 2048
M 1 4096 4096
N 1 8192 8192
O 1 16384 16384
P 1 32768 32768
Q 1 65536 65536
R 1 131072 131072
S 1 262144 262144
T 1 524288 524288
U 1 1048576 1048576
V 0 2097152 0
W 1 4194304 4194304
X 1 8388608 8388608
Y 1 16777216 16777216
Z 1 33554432 33554432
Hide Drive Value 65011706
*********
SCRIPT
*********
' Regisry Modifications for Terminal Servers
'
' Written By: Christopher Stogiera
' Compaq Computer Corp.
' 2-17-2002
ON ERROR Resume NEXT
Dim RegPath
Dim objShell
' Hide Drive Registry Settings
' Hides All Drive Except v: X: C: A:
RegPath = "HKCU\Software\Microsoft\Windows\Current Version\Policies\Explorer"
Set objShell = CreateObject("WScript.Shell"

' objShell.RegDelete (RegPath & "\NoDrives"

objShell.RegWrite RegPath & "\NoDrives", "56623098", "REG_DWORD"
RegPath = ""
objShell = ""
RegPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
Set objShell = CreateObject("WScript.Shell"

' objShell.RegDelete (RegPath & "\NoDrives"

objShell.RegWrite RegPath & "\NoDrives", "56623098", "REG_DWORD"
RegPath = ""
objShell = ""