You are not logged in.
Pages: 1
Hi all,
i have that script vbs:
set objShell = CreateObject("Wscript.Shell")
Set objWSHNet = CreateObject("WScript.Network")
objWSHNet.MapNetworkDrive "V:", "\\localhost\d$"
if err.number=0 then
sDrive = "V:\"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(sDrive).Self.Name = "Data"
end if
But i want to use to map from another station and that station have different credentials.
Anyone can tell me how to modify that script and use it with username and password?
Thank you all.
Last edited by abis (22 Nov 2012 15:32)
Offline
Ok, no one Then ill give myself the answer
set objShell = CreateObject("Wscript.Shell")
set objWSHNet = CreateObject("WScript.Network")
objWSHNet.MapNetworkDrive "V:", "\\server\share", False, "User", "Pa$$w0rd"
if err.number=0 then
sLocalDrive = "V:\"
set oShell = CreateObject("Shell.Application")
oShell.NameSpace(sLocalDrive).Self.Name = "Data"
end if
That one is with persistent disable, change False to True to be enable
Offline
Pages: 1