hide descriptions of network resources

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, everyone!
Well, when user logged on, in "My computer" appears some network disks:
"public on srv-fs" (W:) - as an example.

How to make "public on srv-fs" hide and leave only "W:" ?
Thanks
 
White said:
Hi, everyone!
Well, when user logged on, in "My computer" appears some network disks:
"public on srv-fs" (W:) - as an example.

How to make "public on srv-fs" hide and leave only "W:" ?
Thanks
Hi,

If you can live with ".(W:)", put the following VBScript in a logon
script:


'--------------------8<----------------------

Call AdjustDriveDescription()


Sub AdjustDriveDescription

On Error Resume Next
Dim oShellApp, oWshNet, oDrives, i, sDrive

Set oShellApp = CreateObject("Shell.Application")
Set oWshNet = CreateObject("WScript.Network")
Set oDrives = oWshNet.EnumNetworkDrives

For i = 0 to oDrives.Count - 1 Step 2
sDrive = oDrives.Item(i) & "\"
oShellApp.NameSpace(sDrive).Self.Name = "."
Next

On Error Goto 0
End Sub

'--------------------8<----------------------
 
Well, thanks a lot!
May be one more question here?
How to connect network drives on Win9x using VBS?
Win9x cann't connect using WinNT provider. Any ideas? (not KiX32 :) )

Thanks
 
White said:
Well, thanks a lot!
May be one more question here?
How to connect network drives on Win9x using VBS?
Win9x cann't connect using WinNT provider. Any ideas? (not KiX32 :) )
Hi,

You can use the MapNetworkDrive method for this on Win9x.

Note this one if you have a problem using it in a logon script, or you
need to obtain the UserName property:
http://groups.google.com/group/microsoft.public.scripting.vbscript/msg/f3309146d321897d?hl=en&

WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
 
Back
Top