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
 

madmatt

Awesome is as awesome does.
Political Access
Joined
5 Apr 2002
Messages
13,314
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.
 

JJB6486

Retired Mod
Political Access
Joined
3 Dec 2001
Messages
1,207
net use \\computername\sharename /user:username password

JJB6486
 

brunsodj

OSNN Addict
Joined
15 May 2002
Messages
103
Thanks JJB6486,

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

~Dan
 

JJB6486

Retired Mod
Political Access
Joined
3 Dec 2001
Messages
1,207
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.

Latest profile posts

Xie Electronic Punk Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. 🙁

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk Sazar Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz Electronic Punk Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk Sazar Electronic Punk wrote on Sazar's profile.
Where are you buddy?

Forum statistics

Threads
62,017
Messages
673,238
Members
5,637
Latest member
deniable
Back