Solved

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

Posted on 2002-07-15
9
822 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
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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

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…
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

809 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