Homerboy
Lifer
I'm making a simple script maping a few shared network drives
Dim objNetwork, strDrive, objShell, objUNC
Dim strRemotePath, strDriveLetter, strNewName
'
strDriveLetter = "W:"
strRemotePath = "\\dc.domain.local\test share"
strNewName = "TEST"
' Section to map the network drive
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
' Section which actually (re)names the Mapped Drive
Set objShell = CreateObject("Shell.Application")
objShell.NameSpace(strDriveLetter).Self.Name = strNewName
Wscript.Echo "Check : "& strDriveLetter & " for " & strNewName
WScript.Quit
Error I get is:
Object Required: 'NameSpace(...)'
Code: 800A01A8
This is when logging onto the Win2k3 domain via a win2k workstation.
The script runs fine if I run it locally on the Win2k3 server
Any input would be appreciated.
Thanks!
Dim objNetwork, strDrive, objShell, objUNC
Dim strRemotePath, strDriveLetter, strNewName
'
strDriveLetter = "W:"
strRemotePath = "\\dc.domain.local\test share"
strNewName = "TEST"
' Section to map the network drive
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
' Section which actually (re)names the Mapped Drive
Set objShell = CreateObject("Shell.Application")
objShell.NameSpace(strDriveLetter).Self.Name = strNewName
Wscript.Echo "Check : "& strDriveLetter & " for " & strNewName
WScript.Quit
Error I get is:
Object Required: 'NameSpace(...)'
Code: 800A01A8
This is when logging onto the Win2k3 domain via a win2k workstation.
The script runs fine if I run it locally on the Win2k3 server
Any input would be appreciated.
Thanks!