1.

Solve : Login Batch File Help Needed?

Answer»

I am running Windows XP SP2. I have a Western Digital World Book Edition Network Attached Storage device that runs a specific app for gaining access to the drive through the network. It IS possible to gain access through a RUN command just like accessing a remote share. But when this is done it requires the user to input a username and password. This is not treated as a Domain. I want to write a batch file or something like it to "Net Use" (map) the drive to a letter and automatically have the username and password inputed. This is what I have that is not working in .bat format:

net use K: \\192.168.1.230\id19059143 /U:(username) /p:(password) /persistent : no

Anyone have any suggestions?
TIAQuote

This is what I have that is not working in .bat format:

Not working how? Any ERROR messages? POSSIBLY /persistent : no is a syntax error. (embedded spaces on a parameter)

Let us know. Its says I used an option with an invalid value then just TELLS me the syntax of the command for NET USEDid you try fixing up the persistent parameter? I can reproduce your error with the embedded spaces. I can get it to work by eliminating them.

Code: [Select]net use k: \\192.168.1.230\id19059143 /u:(username) /p:(password) /persistent:no


in the command 'net use' the username and password need to be listed like this;

net use K: \\ipaddress /user:username password

not;

net use K: \\ipaddress /u:username /p:password

as for the persistent bit, I have no idea. I've used net use loads of times for mapping drives and running files/apps on remote machines and drives and I've never used it and it's allways worked.

hope it helps.Blastman, you are the man. My problem was the format for the username and password. Thank You Very Much!!!!!!!!!I'm just pleased you got it working....


Discussion

No Comment Found