Solved

How can I get rid of old drive mapping?

Posted on 2008-06-23
14
396 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
ID: 21847890
Check the keys under:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
0
 
LVL 12

Expert Comment

by:alikaz3
ID: 21847899
>>>>>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
ID: 21847934
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
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.

 
LVL 12

Expert Comment

by:alikaz3
ID: 21847969
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
ID: 21848004
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
ID: 21848044
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
ID: 21848067
@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
 
LVL 70

Expert Comment

by:garycase
ID: 21848349
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
ID: 21848361
... Note:  You have to have "Show hidden files and folders" enabled in Explorer to see NetHood
0
 

Author Comment

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

Expert Comment

by:garycase
ID: 21849137
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
ID: 21849229
I double checked all the users and there no mappings in Nethood.  
0
 

Expert Comment

by:SuBDivisions23
ID: 21849321
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
ID: 31469830
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Synchronize a new Active Directory domain with an existing Office 365 tenant
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

806 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