unable to map a network drive in loginscript



Yves
07-09-2005, 11:56 PM
Here's my situation :

Server is win2003 and workstations are XP pro
Unfortunately there is no domain yet as it must be implemented later.

So, I have to log in locally to the workstation but I need a network
connection to the server at startup for the users to be able to use an
application dealing with the server.

Actually, I created a login script with the following line in a batch file:

net use X: \\servername\share$ password /user:username /persistent:yes

The thing is it does not map at all the network drive. I tried to launch the
batch file from a task, from the startup, etc.. but it's still not mapping.

I probably miss something, can you help me please?

Yves
07-09-2005, 11:56 PM
NB : If I try to connect after I logon through 'Map a network drive', it
works well but I don't want users to establish the connection themselves.

"Yves" wrote:

> Here's my situation :
>
> Server is win2003 and workstations are XP pro
> Unfortunately there is no domain yet as it must be implemented later.
>
> So, I have to log in locally to the workstation but I need a network
> connection to the server at startup for the users to be able to use an
> application dealing with the server.
>
> Actually, I created a login script with the following line in a batch file:
>
> net use X: \\servername\share$ password /user:username /persistent:yes
>
> The thing is it does not map at all the network drive. I tried to launch the
> batch file from a task, from the startup, etc.. but it's still not mapping.
>
> I probably miss something, can you help me please?
>

Yves Leclerc
07-09-2005, 11:56 PM
Any share name with a $ usually indicates a hidden sharename. Hidden share
names are usually reserved for the "administrator" type accounts.


"Yves" <Yves@discussions.microsoft.com> wrote in message
news:EF8692A9-48DB-468F-B481-A243A37A72B1@microsoft.com...
> NB : If I try to connect after I logon through 'Map a network drive', it
> works well but I don't want users to establish the connection themselves.
>
> "Yves" wrote:
>
>> Here's my situation :
>>
>> Server is win2003 and workstations are XP pro
>> Unfortunately there is no domain yet as it must be implemented later.
>>
>> So, I have to log in locally to the workstation but I need a network
>> connection to the server at startup for the users to be able to use an
>> application dealing with the server.
>>
>> Actually, I created a login script with the following line in a batch
>> file:
>>
>> net use X: \\servername\share$ password /user:username /persistent:yes
>>
>> The thing is it does not map at all the network drive. I tried to launch
>> the
>> batch file from a task, from the startup, etc.. but it's still not
>> mapping.
>>
>> I probably miss something, can you help me please?
>>

Pegasus \(MVP\)
07-09-2005, 11:56 PM
"Yves" <Yves@discussions.microsoft.com> wrote in message
news:9E1D4F98-3E40-4F58-82D6-E9213CB6DC56@microsoft.com...
> Here's my situation :
>
> Server is win2003 and workstations are XP pro
> Unfortunately there is no domain yet as it must be implemented later.
>
> So, I have to log in locally to the workstation but I need a network
> connection to the server at startup for the users to be able to use an
> application dealing with the server.
>
> Actually, I created a login script with the following line in a batch
file:
>
> net use X: \\servername\share$ password /user:username /persistent:yes
>
> The thing is it does not map at all the network drive. I tried to launch
the
> batch file from a task, from the startup, etc.. but it's still not
mapping.
>
> I probably miss something, can you help me please?
>

Modify your logon script like so:

@echo off
echo %date% %time% Start of logon script >> c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
net use X: \\servername\share$ password /user:username /persistent:yes
1>>c:\test.log 2>>c:\test.err
echo ErrorLevel of net.exe=%ErrorLevel% >> c:\test.log
net use 1>>c:\test.log 2>>c:\test.err
echo. >> c:\test.log

After your user has reported the problem, examine the two
log files. I suspect that the answer to your problem will
immediately become obvious.


unable to map a network drive in loginscript