I have a pretty basic login script that clears old mapped drives, syncs the
time, then maps the current drives. Most days there is no problem with the
scripts, but I have just a few computers that at least once a week have a
problem mapping to the drives. The get these errors:

=====
"There are open files and/or incomplete directory searches pending on the
connection to O:"
"There are open files and/or incomplete directory searches pending on the
connection to P:"
"There are open files and/or incomplete directory searches pending on the
connection to Q:"
=====

This is the login script

=====

Net Use * /Delete /Yes
Net Time %LOGONSERVER% /set /y
Net Use O: "\\Files\O Drive" /YES
Net Use P: "\\Files\P Drive" /YES
Net Use Q: "\\Files\Q Drive" /YES
======

What I can't figure out is why these few computer have the problem, but no
one else does. If I run the login script manually
(\\domaincontroller\netlogon\logon.bat) after they have logged in for a
minute or two, the script runs fine even though it just failed at logon.

Re: Net Use error during login script by Pegasus

Pegasus
Thu Apr 24 09:01:32 PDT 2008


"Jordan" <none@here.com> wrote in message
news:%23Nv%23JbhpIHA.1164@TK2MSFTNGP04.phx.gbl...
>I have a pretty basic login script that clears old mapped drives, syncs the
>time, then maps the current drives. Most days there is no problem with the
>scripts, but I have just a few computers that at least once a week have a
>problem mapping to the drives. The get these errors:
>
> =====
> "There are open files and/or incomplete directory searches pending on the
> connection to O:"
> "There are open files and/or incomplete directory searches pending on the
> connection to P:"
> "There are open files and/or incomplete directory searches pending on the
> connection to Q:"
> =====
>
> This is the login script
>
> =====
>
> Net Use * /Delete /Yes
> Net Time %LOGONSERVER% /set /y
> Net Use O: "\\Files\O Drive" /YES
> Net Use P: "\\Files\P Drive" /YES
> Net Use Q: "\\Files\Q Drive" /YES
> ======
>
> What I can't figure out is why these few computer have the problem, but no
> one else does. If I run the login script manually
> (\\domaincontroller\netlogon\logon.bat) after they have logged in for a
> minute or two, the script runs fine even though it just failed at logon.

It appears that you got Windows to remember past connections.
There is no point in doing this when you map your drives with a
logon script. Change your code as follows:

net use /persistent:no
Net Use * /Delete /Yes
Net Time %LOGONSERVER% /set /y
Net Use O: "\\Files\O Drive" /YES
Net Use P: "\\Files\P Drive" /YES
Net Use Q: "\\Files\Q Drive" /YES

After a week or two you can delete this line:
Net Use * /Delete /Yes
because you won't have any remembered connections,
hence there will be nothing to delete.



Re: Net Use error during login script by Jordan

Jordan
Thu Apr 24 10:39:25 PDT 2008

I actually do need the connections to be remembered because all the laptop
users use Offline Files on these drives. If I did "/Persistent:No" they
would have to go through My Network Places to get to their files and none of
them can grasp the concept of UNCs.

"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
news:eBPI4RipIHA.5096@TK2MSFTNGP02.phx.gbl...
>
> "Jordan" <none@here.com> wrote in message
> news:%23Nv%23JbhpIHA.1164@TK2MSFTNGP04.phx.gbl...
>>I have a pretty basic login script that clears old mapped drives, syncs
>>the time, then maps the current drives. Most days there is no problem
>>with the scripts, but I have just a few computers that at least once a
>>week have a problem mapping to the drives. The get these errors:
>>
>> =====
>> "There are open files and/or incomplete directory searches pending on the
>> connection to O:"
>> "There are open files and/or incomplete directory searches pending on the
>> connection to P:"
>> "There are open files and/or incomplete directory searches pending on the
>> connection to Q:"
>> =====
>>
>> This is the login script
>>
>> =====
>>
>> Net Use * /Delete /Yes
>> Net Time %LOGONSERVER% /set /y
>> Net Use O: "\\Files\O Drive" /YES
>> Net Use P: "\\Files\P Drive" /YES
>> Net Use Q: "\\Files\Q Drive" /YES
>> ======
>>
>> What I can't figure out is why these few computer have the problem, but
>> no one else does. If I run the login script manually
>> (\\domaincontroller\netlogon\logon.bat) after they have logged in for a
>> minute or two, the script runs fine even though it just failed at logon.
>
> It appears that you got Windows to remember past connections.
> There is no point in doing this when you map your drives with a
> logon script. Change your code as follows:
>
> net use /persistent:no
> Net Use * /Delete /Yes
> Net Time %LOGONSERVER% /set /y
> Net Use O: "\\Files\O Drive" /YES
> Net Use P: "\\Files\P Drive" /YES
> Net Use Q: "\\Files\Q Drive" /YES
>
> After a week or two you can delete this line:
> Net Use * /Delete /Yes
> because you won't have any remembered connections,
> hence there will be nothing to delete.
>
>