Net Use with password and username

brunsodj

OSNN Addict
Joined
15 May 2002
Messages
103
Hey,

I was bored and decided to create a batch file that Maps a share that requires a username and password. I can't seem to find out the correct syntax for this.😕

I think it should look something like this:
net use H: \\computername\Sharename /USER:Username

What syntax do I use for automatically entering the password?
Is this right?


~Dan
 
C:\Documents and Settings\matt>net share \help
The syntax of this command is:


NET SHARE
sharename
sharename=drive😛ath [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents| Programs | None ]
sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents | Programs | None]
{sharename | devicename | drive😛ath} /DELETE

Doesn't appear to be such a syntax.
 
net use \\computername\sharename /user:username password

JJB6486
 
Thanks JJB6486,

That worked great. I also forgot to put the workgroup before my username.

~Dan
 
You dont need to put the workgroup in there. That is the DOMAIN name needed only if your connecting to a Win2k domain and using your Active Directory username/password. You dont need it when only on a workgroup.

JJB6486
 

Members online

No members online now.

Forum statistics

Threads
62,021
Messages
673,242
Members
5,642
Latest member
osipov
Back
Top