Reply
Old June 20th, 2002 Top | #1
 
brunsodj's Avatar
OSNN Addict
Joined: May 2002
Posts: 103
Reputation: 10
Power: 124

Default Net Use with password and username

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.:confused:

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
brunsodj is offline   Reply With Quote
Old June 20th, 2002 Top | #2
 
madmatt's Avatar
Bow Down to the King
Joined: April 2002
Location: New York
Posts: 13,312
Reputation: 4090
Power: 297

Default

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


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

Doesn't appear to be such a syntax.

madmatt is offline   Reply With Quote
Old June 20th, 2002 Top | #3
 
JJB6486's Avatar
Retired Mod
Joined: December 2001
Location: West Lafayette, IN, USA
Posts: 1,207
Reputation: 0
Power: 140

Default

net use \\computername\sharename /user:username password

JJB6486
JJB6486 is offline   Reply With Quote
Old June 20th, 2002 Top | #4
 
brunsodj's Avatar
OSNN Addict
Joined: May 2002
Posts: 103
Reputation: 10
Power: 124

Default

Thanks JJB6486,

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

~Dan
brunsodj is offline   Reply With Quote
Old June 20th, 2002 Top | #5
 
JJB6486's Avatar
Retired Mod
Joined: December 2001
Location: West Lafayette, IN, USA
Posts: 1,207
Reputation: 0
Power: 140

Default

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
JJB6486 is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Home Network - Username and Password johnnycat Windows Desktop Systems 9 February 23rd, 2006 5:49pm
theme for my username... Tittles Graphic Design 15 July 29th, 2004 6:56pm
username and password??? monica Windows Desktop Systems 11 June 16th, 2004 8:36pm
Username macthemac Site Problems & Feedback 9 August 26th, 2002 11:42am
gay username nepluto Windows Desktop Systems 26 January 4th, 2002 8:51pm