Solved

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

Posted on 2002-07-15
9
820 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
Comment Utility
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
Comment Utility
check eventvwr.msc and list event ID's and source here.
0
 
LVL 7

Expert Comment

by:franka
Comment Utility
please do a checkdisk with sector checking on your system drive
0
 
LVL 2

Expert Comment

by:edmonds_robert
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 9

Expert Comment

by:schmiegu
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Backup Your Microsoft Windows Server®

Backup 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.

Join & Write a Comment

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…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now