PC Review


Reply
Thread Tools Rate Thread

Net Use eror during login script

 
 
Jordan
Guest
Posts: n/a
 
      24th Apr 2008
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.



 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      24th Apr 2008

"Jordan" <(E-Mail Removed)> wrote in message
news:%23Nv%(E-Mail Removed)...
>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.


 
Reply With Quote
 
 
 
 
Jordan
Guest
Posts: n/a
 
      24th Apr 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)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "Jordan" <(E-Mail Removed)> wrote in message
> news:%23Nv%(E-Mail Removed)...
>>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.
>
>




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I run a VB Script that requires a response during login script david_berger@nebf.com Microsoft Windows 2000 1 23rd Jan 2007 10:08 PM
BUG: Script blocking strips script parameters during script authorization Jonathan K. Shay Spyware Announcements 3 2nd May 2005 06:18 PM
Net use in Login script Anthony Microsoft Windows 2000 CMD Promt 3 21st Nov 2003 11:18 PM
Net Use in Login Script Anthony Microsoft Windows 2000 Group Policy 2 18th Nov 2003 04:01 PM
login script problems with net use Brian Henry Microsoft Windows 2000 3 23rd Jul 2003 04:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:38 PM.