Computing.Net > Forums > Programming > Net Use bug?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Net Use bug?

Reply to Message Icon

Name: keridbey
Date: March 12, 2009 at 11:16:58 Pacific
OS: Windows XP
CPU/Ram: 1.3 Ghz / 1 Gb RAM
Subcategory: Batch
Comment:

I have been using a batch file to automatically map a drive to remote PCs. It's been working fine until the last month or so. Here's how I've been doing it:

echo. | net use %drive%: \\%IP%\c$ /user:administrator password >nul

The "echo. |" will allow the user to not have to enter a username or a password in order to map the drive. Unfortunately, some of the systems I regularly connect to have started rejecting this method for no reason I can find. It will give this:

System error 1326 has occurred.
Logon failure: unknown user name or bad password.

Neither the username or the password on the remote system have been changed; in fact, if I run the NET USE command manually using the same username and password (without the "echo. |"), it connects just fine. Can anyone think of a reason why the automatic method would suddenly stop working? Obviously something has changed, but I don't have the first idea where to start looking. The system I'm connecting from is running WinXP Pro SP2, the systems I connect to are Win2000 Pro SP3.



Sponsored Link
Ads by Google

Response Number 1
Name: Judago
Date: March 12, 2009 at 13:51:06 Pacific
Reply:

I'm not sure if it will help but there is another way to send return to a command. Inputting nul into it using "< nul".

<nul >nul net use %drive%: \\%IP%\c$ /user:administrator password


0

Response Number 2
Name: keridbey
Date: March 16, 2009 at 12:14:00 Pacific
Reply:

Thanks! I will give that a try!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


AIX read and search text ... Using nslookup in a batch...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Net Use bug?

Net Use Command - windows 2K www.computing.net/answers/programming/net-use-command-windows-2k/11924.html

batch file for net use www.computing.net/answers/programming/batch-file-for-net-use/15808.html

net use lpt1 fails in batch file www.computing.net/answers/programming/net-use-lpt1-fails-in-batch-file/16662.html