Solved

How can I get rid of old drive mapping?

Posted on 2008-06-23
14
390 Views
Last Modified: 2010-04-21
We run a Windows domain with a Windows 2003 domain controller.  We have XP Pro SP3 clients.  When a user logs on there is script that runs that first clears all previously mapped drives (@echo off
net use * /delete /yes) then maps the drives needed and then runs an antivirus update.  The problem is that there are drive mappings that are no longer needed that keep getting mapped after every logon.  I have disconnected them untold number of times and they keep getting remapped.  I installed the Microsoft User Hive Profile Cleanup service to no joy.  I have searched the registry trying to find a key that I could delete to stop these old paths from being mapped and after logon they keep getting re-added to the registry.  How do I get rid of, and stay rid of, the old drive mappings?
0
Comment
Question by:BrianSDG
  • 6
  • 3
  • 2
  • +2
14 Comments
 
LVL 2

Expert Comment

by:Jamsb
Comment Utility
Check the keys under:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
0
 
LVL 12

Expert Comment

by:alikaz3
Comment Utility
>>>>>When a user logs on there is script that runs that first clears all previously mapped drives

You should be able to find where this logon script is bound to a user/group. Find the association to the script file, which will lead you to the location of the logon script file. Edit the file, and remove the shares that you don't want. This should prevent them showing up.
0
 

Author Comment

by:BrianSDG
Comment Utility
I did, as I mentioned above, after I delete the MountPoints2 keys and then reboot or log out and log back in they get rewritten to the registry and thus re-appear mapped in My Computer.
0
 
LVL 12

Expert Comment

by:alikaz3
Comment Utility
Are there multiple logon scripts perhaps? Check Jamsb's suggestion for a locally entered manual map. Here is also the default file location for scripts:

%SystemRoot%\sysvol\sysvol\<domain DNS name>\scripts



Deleting them out of the script file should have taken care of it, which leads me to believe there are multiple scripts
0
 

Author Comment

by:BrianSDG
Comment Utility
alikaz3 - The logon script is on our primary domain controler in C:\WINDOWS\SYSVOL\sysvol\domainname\scripts.  It is called as part of the AD setting for my user profile and it is a script that only runs for me.  My script is supposed to get rid of old mappings and map the ones I want but it doesn't get rid of the old ones and causes drive letter conflicts.
0
 

Accepted Solution

by:
SuBDivisions23 earned 500 total points
Comment Utility
Can you post the script so i can see it.. It sounds like its not removing the drives before it trys to assign the new network shares to pre-exisint drive letters.
0
 

Author Comment

by:BrianSDG
Comment Utility
@echo off
net use * /delete /yes

net use K: \\admnas\SYSADM
net use L: \\goodlink\e$
net use M: \\NASMAC\nasmac
net use O: \\CCGFS\files
net use P: \\CCGFS\Files\Archived Resources
net use S: \\MAIN\Scans

net use Z: \\nas\files\alliance_nt

REM \\MAIN\OFCSCAN\AUTOPCC

\\CCGACCT\OFCSCAN\AUTOPCC

net start "Trend Micro Client/Server Security Agent Listener"

net start "Trend Micro Client/Server Security Agent Personal Firewall"

net start "Trend Micro Client/Server Security Agent RealTime Scan"
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 70

Expert Comment

by:garycase
Comment Utility
Go to C:\Documents and Settings\<User Name>\NetHood\  and delete all of the current contents (the appropriate ones will be recreated on next login).   You may have to do this not only for the main user but also for "All Users" and "Default User" depending on when the old mappings were made.
0
 
LVL 70

Expert Comment

by:garycase
Comment Utility
... Note:  You have to have "Show hidden files and folders" enabled in Explorer to see NetHood
0
 

Author Comment

by:BrianSDG
Comment Utility
garycase - I did with no joy.  The old mappings comeback.
0
 
LVL 70

Expert Comment

by:garycase
Comment Utility
Did you delete all of the entries for ALL of the user accounts?
Are there any configuration settings in the programs you're loading that might reference the old mappings?
0
 

Author Comment

by:BrianSDG
Comment Utility
I double checked all the users and there no mappings in Nethood.  
0
 

Expert Comment

by:SuBDivisions23
Comment Utility
Going out on a limb, but i thinnk you have to add the Persistent line...

Try this on the script:

@echo off
net use * /delete /yes /persistent:yes

net use K: \\admnas\SYSADM
net use L: \\goodlink\e$
net use M: \\NASMAC\nasmac
net use O: \\CCGFS\files
net use P: \\CCGFS\Files\Archived Resources
net use S: \\MAIN\Scans

net use Z: \\nas\files\alliance_nt

REM \\MAIN\OFCSCAN\AUTOPCC

\\CCGACCT\OFCSCAN\AUTOPCC

net start "Trend Micro Client/Server Security Agent Listener"

net start "Trend Micro Client/Server Security Agent Personal Firewall"

net start "Trend Micro Client/Server Security Agent RealTime Scan"
0
 

Author Closing Comment

by:BrianSDG
Comment Utility
SuBDivisions23 - Thanks, you got me thinking in the right direction. I switched the sections around and it worked.  But I don't know why. I took the drive mapping section of the script and put it after the anti virus update section and the old drives stopped being re-mapped. Although there is nothing in AUTOPCC that would have caused the problem.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Mapping Drives using Group policy preferences Are you still using old scripts to map your network drives if so this article will show you how to get away for old scripts and move toward Group Policy Preference for mapping them. First things f…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

743 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

9 Experts available now in Live!

Get 1:1 Help Now