Net Use eror during login script

Discussion in 'Microsoft Windows 2000 Networking' started by Jordan, Apr 24, 2008.

  1. Jordan

    Jordan Guest

    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.
     
    Jordan, Apr 24, 2008
    #1
    1. Advertisements

  2. Re: Net Use error during login script

    "Jordan" <> wrote in message
    news:%23Nv%...
    >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.
     
    Pegasus \(MVP\), Apr 24, 2008
    #2
    1. Advertisements

  3. Jordan

    Jordan Guest

    Re: Net Use error during login script

    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)" <> wrote in message
    news:...
    >
    > "Jordan" <> wrote in message
    > news:%23Nv%...
    >>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.
    >
    >
     
    Jordan, Apr 24, 2008
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Mackler

    NTP Eror

    Dave Mackler, Aug 1, 2003, in forum: Microsoft Windows 2000 Networking
    Replies:
    0
    Views:
    207
    Dave Mackler
    Aug 1, 2003
  2. Mark

    Mapped Drives during logon script

    Mark, Oct 2, 2003, in forum: Microsoft Windows 2000 Networking
    Replies:
    0
    Views:
    232
  3. Cam

    Getting the NET USE command script to work

    Cam, Dec 11, 2003, in forum: Microsoft Windows 2000 Networking
    Replies:
    3
    Views:
    462
    Robert L [MS-MVP]
    Dec 13, 2003
  4. dip

    popup eror

    dip, May 21, 2004, in forum: Microsoft Windows 2000 Networking
    Replies:
    0
    Views:
    205
  5. NET USE failure in a hidden login script.

    , Sep 13, 2005, in forum: Microsoft Windows 2000 Networking
    Replies:
    0
    Views:
    246
Loading...

Share This Page