Hide mapped drives through log on script in Windows XP Professional SP3

160 pts.
Mapped drives
Windows XP Professional
Windows XP SP3
Hi Is it possible to hide a mapped drive from view in the "My Computer" folder? I have all my drives mapped by scripts on logon, I'm wanting to hide the S: drive but it is essential that it is mapped as many RM Software runs through this drive, this is my script: *********************************************************
'// Declare All variables Option Explicit

'// Comment this out for debugging! On Error Resume Next

'// Variables Dim network, filesys, shell Dim serverpath, servername

'// Create Windows Scripting Object Set network = CreateObject("WScript.Network") Set filesys = CreateObject("Scripting.FileSystemObject") Set shell = CreateObject("WScript.Shell")

'// Define UNC Paths servername = "pvserver" serverpath = "\" & servername & ""

'// Dont run on the server! If LCase(network.ComputerName) = servername Then   err.Raise1, "Can not run on the server!" End If

'// map network drives network.MapNetworkDrive "s:", serverpath & "software" network.MapNetworkDrive "o:", serverpath & "Pupil Resources" network.MapNetworkDrive "z:", serverpath & "Media" network.MapNetworkDrive "G:", serverpath & "Sherston"
******************************************************* hope someone can help many thanks :-) Phil

Software/Hardware used:
Windows XP Professional SP3, Windows Server 2003 SP2 (Not R2)

Answer Wiki

Thanks. We'll let you know when a new response is added.

To “hide” the drive in Windows Explorer you can manually set the group policy to not show a specific drive letter. This is done with a bitmap. Note that you can still access the drive from the command line.

reg add “HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer” /v NoDrives /t REG_DWORD /d X

X – Data can be decimal, hex or bin if signed.

Value Map
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 16348
P 23768
Q 65536
R 131072
S 262144
T 524288
U 1048576
V 2097152
W 4194304
X 8388608
Y 16777216
Z 33554432

BitMap 0 – Shown, 1 – Hidden

Using Group Policy Objects to hide specified drives.

Found a couple sites that talked about doing so editing the registry you can give this a glance over and see if they help you in anyway.

Also try setting up a UNC path to use instead if at all possible.

Discuss This Question: 2  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Philcrox
    Thanks for you help! i still need to know if there is a way of hiding these drives via the vbscript. it will help me out loads. i dont like touching the registry and would like to do it this way if possible :-) many thanks Phil
    160 pointsBadges:
  • carlosdl
    If the registry fix works, you could add it to a vbscript to automate the process. I don't think it will be possible without modifying the registry. I hope to be wrong.
    85,885 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: