Hello all,
I am having a bit of a problem trying to rename mapped network drives. We use a .bat logon script that maps our network drives using net use and then the batch script calls a vbscript that renames the network drives. The script vbscript looks like:
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace("H:\").Self.Name = "Home"
oShell.NameSpace("I:\").Self.Name = "ProgramFiles"
oShell.NameSpace("P:\").Self.Name = "Public"
oShell.NameSpace("X:\").Self.Name = "Apps"
The problem is that we now would like to label the H: Drive with the %username% variable, so it shows the user's logon name. So for example Sue Water's H: Drive would show up as waterss (H in My Computer. How would I go about doing this?
I am having a bit of a problem trying to rename mapped network drives. We use a .bat logon script that maps our network drives using net use and then the batch script calls a vbscript that renames the network drives. The script vbscript looks like:
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace("H:\").Self.Name = "Home"
oShell.NameSpace("I:\").Self.Name = "ProgramFiles"
oShell.NameSpace("P:\").Self.Name = "Public"
oShell.NameSpace("X:\").Self.Name = "Apps"
The problem is that we now would like to label the H: Drive with the %username% variable, so it shows the user's logon name. So for example Sue Water's H: Drive would show up as waterss (H in My Computer. How would I go about doing this?