I am currently using net use in the login script to show mapped drives in Windows Explorer for my users. It seems as Share on 'server\share'. Can anyone tell me a way to just show it as Share only? I do not want the full path there. Thanks.
Printable View
I am currently using net use in the login script to show mapped drives in Windows Explorer for my users. It seems as Share on 'server\share'. Can anyone tell me a way to just show it as Share only? I do not want the full path there. Thanks.
Have you tried to mount the network drives with VBScript, after the mounting you can use the below snippet:
Code:sDrive = "F:\"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(sDrive).Self.Name = "Data"
I have never in my life used a vbscript before, and I do not understand what do you mean by mount the network drive with vbsscript? Thanks.
I think that you will need a Wscript.Network Object before you call the "mapnetworkdrive" method. Below is the proper syntax:
Code:set objWSHNet = CreateObject("Wscript.Network")
set objShell = CreateObject("Wscript.Shell")
strUserName = objShell.ExpandEnvironmentStrings("%username%")
strCompName = objShell.ExpandEnvironmentStrings("%computername%")
'Map drive for Username
objWSHNet.MapNetworkDrive "I:", "\\" & strCompName & "\lotus\" & strUsername
if err.number=0 then
sDrive = "I:\"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(sDrive).Self.Name = "Writeup"
end if