Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Map a drive with authentication

Status
Not open for further replies.

kachbo1

IS-IT--Management
Nov 16, 2004
40
GB
Hi,

I have a batch file which works pretty well however I would like to do the same using a vbscript.

net use r: \\ukhakpr02\software par1s2 /user:hakguest

I am trying to do this but it doesn't work.

WSHNetwork.MapNetworkDrive "V:", "\\ukhakpr02\software" /UID=hakguest;PWD=par1s2
 
have you tried using ""

/UID="hakguest";PWD="par1s2
 
Hi,

It doesn't like the quotes in the line. Do I need the semi colon?

Have I actually got the syntax correct in the first place?

Any help appreciated.

Kachbo.
 
this works for me

WSHNetwork.MapNetworkDrive "K:", "\\mch\software", True, "domx\userx", "password123"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top