Link to home
Start Free TrialLog in
Avatar of kcs_tec
kcs_tec

asked on

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

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?



Avatar of SysExpert
SysExpert
Flag of Israel image

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 !
check eventvwr.msc and list event ID's and source here.
please do a checkdisk with sector checking on your system drive
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.

Avatar of schmiegu
schmiegu

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
Avatar of kcs_tec

ASKER

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.


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
ASKER CERTIFIED SOLUTION
Avatar of schmiegu
schmiegu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kcs_tec

ASKER

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.