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

160 pts.
Tags:
Mapped drives
Scripting
Scripts
Windows XP Professional
Windows XP Professional SP3
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 am 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
11111111111111111111111111
ZYXWVUTSRQPONMLKJIHGFEDCBA

<a href=”http://support.microsoft.com/kb/231289″>Using Group Policy Objects to hide specified drives</a>
—————————–

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.

http://groups.google.com/group/microsoft.public.windows.server.scripting/browse_thread/thread/32d4819f9f199677/40acac288194843d#40acac288194843d

http://support.microsoft.com/?id=158457

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

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd02642c-8389-4563-9cd2-bae8a516c722.mspx?mfr=true

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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:
    report
  • 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.
    69,175 pointsBadges:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following