Solved

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

Posted on 2002-07-15
9
823 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

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…
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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