Re: Automatically Logon To Network Share



On Fri, 23 Jan 2009 20:13:07 +0000, DavidM
<davidm_uk_notme@xxxxxxxxxxx> wrote:

I've just bought a 1Tb LaCie ethernet disk mini (NAS drive). It's set
up and working ok, and I've mapped the share to a drive letter
(including reconnect at logon). Problem is I have to enter the
password before I can access the drive.

My backup (to the NAS drive) programs run automatically the first
time each user logs into Windows each day, and I don't want to have to
logon to the share and then manually run them.

The Lacie drive won't allow me to create a share without a password.

How can I get an automatic logon to the network share when each user
logs in to Windows (in simple terms please - I'm not a networks whiz
by any means)?

(running XP home, SP2).

Thanks, David
Well, I've been able to find a solution, although it's a bit
"agricultural" (and maybe shows my age!).

I use a batch file with the command NET USE as follows:

@echo off
REM Wait for about 30 seconds then map network drive EDMINI\share to
dive letter N:
ping -n 1 -w 20000 192.168.1.96 >nul
net use n: \\EDMINI\share xxxxx /USER:yyyy
exit

The ping command inserts a delay of about 20 seconds after the batch
file is run and before executing the net use command. This allows time
after the user has logged on for the network connection to the drive
to get established. Apparently using the ping command is the least
resource use way of putting a delay in a batch file. I've used this
before with values up to 6000 (about 1 minute) and it seems ok.

The net use command then maps the share to drive n: using user name
yyyy with password xxxx.

I then created a shortcut for the batch file and inserted this into
the STARTUP folder in the Start\Programs menu for all users. The
shortcut properties are set to run the batch file minimsed.

If the share is already mapped when the batch file is run, the net use
command just reports an error, and the batch file continues to it's
natural end with no ill effects.

So far, this seems to be working reliably.

The main issue to be considered is that the user name and password are
in full view in the batch file. I've decided that I can live with this
risk, others may not, and maybe there's another way of doing this.

(from start menu/run type cmd, then in the command window type

net use /help

to get a full list of the net use command switches. Note that the
SAVECRED switch is not available in XP Home)

Hope someone finds this useful.

David
.



Relevant Pages

  • Re: Application starts too soon
    ... expecting a network connection to exist. ... > The application runs froma a batch file. ... Finally the command prompt arrives, ... > think the app tries to run, encounters an error, and exits. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Automatically login to network share?
    ... logon to the share and then manually run them. ... How can I get an automatic logon to the network share when each user ... I use a batch file with the command NET USE as follows: ... The ping command inserts a delay of about 20 seconds after the batch ...
    (microsoft.public.windowsxp.basics)
  • Re: reconnect at startup
    ... "Remap on logon" box, but the mapping does not survive a restart. ... I have made up a batch file with the command line ... I need some way to invoke the batch file when XP ... Once you create the subst drive, you should not have to do so again. ...
    (microsoft.public.windowsxp.network_web)
  • Re: use batch file to map network drive that requires username and password
    ... > so if i was to create a network drive like the one below how would i put ... The syntax of this command is: ... Placing passwords into a batch file represents an obvious security risk. ...
    (microsoft.public.win2000.general)
  • Re: Unable to connect Windows 95 machine to a share drive on Windo
    ... > Then from another Windows 2000 machine which is also in the same domain I ... > Also note that if I give the above command without the XP-MACHINE-NAME\ ... Hence, network connectivity is ... You have to use the network logon in Windows 95. ...
    (microsoft.public.windowsxp.network_web)

Loading