Solved

Home folder mapping won't disconnect in script (win2k)

Posted on 2002-07-15
9
826 Views
Last Modified: 2012-08-14
Ok here's a problem for everyone. Any help would be much
appreciated.

We just setup a new Win2k workstation and setup the
default user so that multiple users can login to that
machine and all use the default profile (which is then
copied to a new profile and stored).

We have an NT 4.0 PDC with all users home folders which
are set in user manager (eg: map S: to \\kcs1\ben$)
Also we have a script file (logon.bat) in netlogon
share which runs when each user logs in to the new
win2k workstation.

There are two lines in this script file:

net use S: /D
net use S: /home

Everything has been working fine with the home
folder mappings on our Win95 machines but on the win2k
machine sometimes we get the following error appear
when the script file runs as a user is logging in:

There are open files and/or incomplete directory searches
pending on the connection to S:.

Is it OK to continue disconnecting and force them closed?
(Y/N) [N]:

-------------------------------------------------------
Then usually this error:
-------------------------

windows was unable to save all the data for the file
\;s:0\kcs1\03elou$\cookies\index.dat. The data has been lost.
This error may be caused by a failure of your computer hardware
or network connection. Please try to save this file elsewhere.
-------------------------------------------------------

Everything works normally once they've clicked 'OK'
except that there is no S: drive been mapped on the
computer and we need it.

I also sometimes get this error when I logon as a domain
admin and then I have to manually connect the mapping
which is a real pain.

Any ideas?



0
Comment
Question by:kcs_tec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 7154556
1) I would turn off indexing on win2k.

2) I would add the same script to the Startup folder instead of or in addition to the Login script.

Update all your drivers , especially the NIC.

Get SP2 and any other relevant hot fixes applied.

I hope this helps !
0
 
LVL 16

Expert Comment

by:GUEEN
ID: 7154982
check eventvwr.msc and list event ID's and source here.
0
 
LVL 7

Expert Comment

by:franka
ID: 7155276
please do a checkdisk with sector checking on your system drive
0
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

 
LVL 2

Expert Comment

by:edmonds_robert
ID: 7155693
Another thing that you must do in that login script when using it on a Windows 2000 machine is add a persistent:no to the end of the net use statement:

net use s: /home /persistent:no

This kind of takes care of the problem.  It's supposed to solve it, but in my experience, it does MOST of the time.  Others, you just hit enter in the login script box and it flies right by.  Try it out.

I go one step further (take it for what it's worth) and preceed the statement with:

if exist s: net use s: /delete

This eliminates any other drive mapping conflicts created by over enthusiastic users.

0
 
LVL 9

Expert Comment

by:schmiegu
ID: 7156357
You don't need to map the S: drive for NT/W2k clients, if you've set it in User Manager. I'm not sure, but I believe, you must map it for W9x (never used it in a corporate environment).
So I'd modify the script this way:

if %OS% == WINDOWS_NT goto no_map
if exist S:\nul net use S: /d
net use S: /home
:no_map
0
 

Author Comment

by:kcs_tec
ID: 7157129
Right, I tried all the things people have suggested so
far (minus adding service pack2). However nothing had
made any difference until I took schmiegu's advice and
removed the mapping line from the logon.bat in netlogon.
I never realised that Win2k actually maps the drive to
the home folder specified in the PDC user manager and now
it works fine. Although we still get the error:

windows was unable to save all the data for the file
\;s:0\kcs1\03elou$\cookies\index.dat. The data has been lost.
This error may be caused by a failure of your computer hardware
or network connection. Please try to save this file elsewhere.
------------------------------------------------------

I thought this would be fixed when I disabled the indexing
service but it still happens sometimes. However the user
just has to click OK once and then everything is fine, so
the main thing was getting the home folder to map
correctly.

Thanks schmiegu.


0
 
LVL 1

Expert Comment

by:Serverman2001
ID: 7158288
Have you tried going into the registry and searching for the string <persistent connections> change the default entry (yes) to a (no)you will need to change this possibly twice also run gpedit.msc and set the synchronous policy to enabled and finaly make sure you disconnect drive mappings before copying your user profile to default users


hope this helps

 Darren
0
 
LVL 9

Accepted Solution

by:
schmiegu earned 250 total points
ID: 7158697
03elou$ - was this the homeshare you used setting up the default profile?
Then serverman got the point: everybody's getting this connection when loading his profile - but with 2 problems:
1. no permissions
2. duplicate drive mapping

Then you should go through the registry of Default User and delete the occurances of 03elou$. Then delete all other user profiles (or at least one to test).
0
 

Author Comment

by:kcs_tec
ID: 7159671
Ok, I searched through the registry like serverman
suggested and found one entry of persistent connections
which was still set to 'yes' so I changed it.

When I setup the default user profile I wasn't using
any mapped net connections at all so I don't think thats
the problem.

Everything seems to be ok for now so I'm going to assume
that it's all working and if there are no other comments
tomorrow then I will close the connection and give the
points to schmiegu.

Thanks again everyone.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question