Home / Microsoft / Microsoft DOS / Login Batch File Help Needed
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Login Batch File Help Needed  (Read 2746 times)
anthonyp22
Topic Starter
Starter



Posts: 3


« on: April 02, 2008, 07:28:56 AM »

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?
TIA
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,342

Experience: Familiar
OS: Windows 7

« Reply #1 on: April 02, 2008, 01:39:27 PM »

Quote
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. 8)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
anthonyp22
Topic Starter
Starter



Posts: 3


« Reply #2 on: April 02, 2008, 05:25:15 PM »

Its says I used an option with an invalid value then just tells me the syntax of the command for NET USE
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,342

Experience: Familiar
OS: Windows 7

« Reply #3 on: April 02, 2008, 06:08:48 PM »

Did 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

 8)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
blastman
Hopeful



Posts: 303


« Reply #4 on: April 03, 2008, 02:51:47 AM »

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.
IP logged


Blastman, you are the man. Thank You Very Much!!!!!!!!!


anthonyp22
Topic Starter
Starter



Posts: 3


« Reply #5 on: April 03, 2008, 03:55:06 AM »

Blastman, you are the man. My problem was the format for the username and password. Thank You Very Much!!!!!!!!!
IP logged
blastman
Hopeful



Posts: 303


« Reply #6 on: April 03, 2008, 04:06:32 AM »

I'm just pleased you got it working.... ;)
IP logged


Blastman, you are the man. Thank You Very Much!!!!!!!!!


Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / Login Batch File Help Needed « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.129 seconds with 21 queries.