1.

Solve : net use?

Answer»

I'm setting up a scheduled task to retrieve some files from a remote server over VPN using MS DOS.  A drive has already been mapped on my machine but, SINCE connecting VIA VPN is part of the process, the drive is disconnected and requires a LOGIN to connect it.  Could someone just give me an example of how to connect to a drive using NET USE with a user name and password?  Thanks.Code: [SELECT]net use x: \\server\share /user:username password
X: would be the drive letter you want
\\server would be the computer name
\share would be the network share, or path
username would be the username
password would be the password

If it is already connected, you may NEED to disconnect it first with
Code: [Select]net use x: /del
net use x: \\server\share /user:username passwordThank you very much.  This code works.

net use x: \\server\share /user:username passwordyou may want to put the mapping of the drive into a short vbe and call the vbe from the batch script... with the cscript command...



Discussion

No Comment Found