This is something I wrote up a while ago, It looks as if MS never change the basics in their OS so its still valid! I am setting up a GPO and it needs to hide Drives A: to drives E: The option in the GPO are A:, A: B:, A: B: C:, C:, none or all. So, I can't hide E: F: etc without messing around for ages. It was the same in Windows 2000 Server and it was an issue then as well!
anyway after a few hours messing I found that here is how to do it.....
Drive letter and corresponding code
A 1
B 2
C 4
D 8
E 16
F 32
G 64
H 128
I 256
J 512
K 1024
L 2048
M 4096
N 8192
O 16384
P 32768
Q 65536
R 131072
S 262144
T 524288
U 1048576
V 2097152
W 4194304
X 8388608
Y 16777216
Z 33554432
ALL 67108863
If you want to block multiple drives, add the values of those drives together.
eg.
Block A & B = 3
Block A, B, C & D = 15
Here is the script for the new adm file.
Code:
CLASS USER
CATEGORY !!HideDrives
KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
POLICY !!HideDrives
PART !!HideDrivesDropdown DROPDOWNLIST NOSORT REQUIRED
VALUENAME "NoDrives"
ITEMLIST
NAME !!ABOnly VALUE NUMERIC 3
NAME !!COnly VALUE NUMERIC 4
NAME !!DOnly VALUE NUMERIC 8
NAME !!ABConly VALUE NUMERIC 7
NAME !!ABCDOnly VALUE NUMERIC 15
NAME !!HideACE VALUE NUMERIC 21
NAME !!HideCE VALUE NUMERIC 20
NAME !!HideCDE VALUE NUMERIC 28
NAME !!HideACEF VALUE NUMERIC 53
NAME !!HideCEF VALUE NUMERIC 52
NAME !!ALLDrives VALUE NUMERIC 67108863 DEFAULT
NAME !!RestNoDrives VALUE NUMERIC 0
END ITEMLIST
END PART
END POLICY
END CATEGORY;HideDrives
[strings]
Blank=" "
ABCDOnly="Restrict A, B, C and D drives only"
ABConly="Restrict A, B and C drives only"
ABOnly="Restrict A and B drives only"
ALLDrives="Restrict all drives"
COnly="Restrict C drive only"
DOnly="Restrict D drive only"
HideACEF="Restrict A,C,E and F drives only"
HideCDE="Restrict C, D and E drives only"
HideACE="Restrict A, C and E drives only"
HideCE="Restrict C and E drives only"
HideCEF="Restrict C, E and F drives only"
HideDrives="Hide Drives"
HideDrivesDropdown="Hide Drives Selection"
MoveProfile="Move Profiles"
MoveProfileDropdown="Move User Profile Location"
MOVEPROFILETOD="Move Profile to D Drive"
RestNoDrives="Restore Drives"
Save the file as hidedrives.adm and save it in your server's Windows Inf folder. Then in gpedit.msc right click Administrative Templates, select Add Template and select your hidedrives.adm file. This will add it to the GPO and allow you to block the drives on that work station or Terminal Service Server in this case.
Just though maybe this may be of some use to someone in the future.