Solved

Printers keep coming back after being deleted

Posted on 2010-09-07
11
11,444 Views
Last Modified: 2016-04-13
I previously had some printers being deployed per users, but are now being deployed per machine via group policy. Most are new names and new shares. Old shares have been deleted, and there is no longer any policy being applied that would install the old printers. I noticed though that somehow, some of the older printers are still appearing in the users Print and Fax list. If you delete the printers from the list and reboot, then will return. I have been going insane trying to resolve this issue. I found some entries in the registry (about 17 different entries per printer) for the printers, and decided to remove them all for one specific printer to see if it worked. It did. That particular printer no long appears. Is there an easier way to fix this. This method maybe a little time consuming for 100 machines and about 10 printers.

I also included the keys where I found some of the entries if it will help. You can see the server name and the specific printer I worked with at the time.

[HKEY_CURRENT_USER\Printers\Connections\,,datastore1,Legal P1]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts]
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Connections\,,datastore1,Legal P1]
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\Print\Connections\,,datastore1,Legal P1]
[HKEY_USERS\.DEFAULT\Printers\Connections\,,datastore1,Legal P1]
[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\Devices]
[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts]
[HKEY_USERS\S-1-5-19\Printers\Connections\,,datastore1,Legal P1]
[HKEY_USERS\S-1-5-19\Software\Microsoft\Windows NT\CurrentVersion\Devices]
[HKEY_USERS\S-1-5-19\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts]
[HKEY_USERS\S-1-5-20\Printers\Connections\,,datastore1,Legal P1]
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\Devices]
[HKEY_USERS\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts]

My server is Windows Server 2008 with SP2 and clients are all Windows XP with SP3.

Thanks,
0
Comment
Question by:mrevillaatico
11 Comments
 
LVL 3

Expert Comment

by:insightcomputing
ID: 33620920
Turn off the old server that was sharing the printers. get that old server off the domain as soon as possible. Not only will printers get screwy, so will shares.
0
 

Author Comment

by:mrevillaatico
ID: 33621037
That's not going to be possible. Its the same server. Would this even matter though? The shares are not even there any more. Like I said though, it seems as though it is client side now. I have read that it could be applied because of another user profile on the machine, which may be related to why when I removed all the entries in the registry it worked.

I also used this spooler cleanup utility on a VM to test. That worked also , but it seemed like it was very brute. It took out the MS office printer and a couple other locally installed printers, so I am avoiding that route at all costs.
0
 
LVL 16

Expert Comment

by:Spike99
ID: 33621582
We had the same problem: those old network printer connections were saved in the users' profile when we switched over to Tricerat's ScrewDrivers sofware (a 3rd party printing solution that streamlines redirected printers).  The users couldn't delete those old printers from their printers folder because they didn't have rights to do so (they're not admins or power users).

You could clear the user's  local and roaming profile to get rid of those saved network printer connections, but we couldn't do that.  We had hundreds of users having this problem, it wasn't practical to clear so many profiles.

Instead, we put in a VBS logon script that deletes the printers key from HKEY_Current_User.  This key will be regenerated the next time they log on.

How are users mapping to those shared printers? do you have logon scripts?

Because, deleting the HKCU\Printers key at log on would wipe out those, too.  So, you would have to map those printers for user in another logon script.

Here are some samples


RemPrinters.vbs
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 16

Expert Comment

by:Spike99
ID: 33621709
Oops.

I meant to also explain how to use a batch file to map network printers.

For each printer, add a line like this to the batch file:

rundll32 printui.dll,PrintUIEntry /in /u /z /n\\servername\printersharename

Add a this switch to the line for the default printer:   /y

This page has more details on what the different switches do for this command:
http://www.robvanderwoude.com/2kprintcontrol.php

I hope this helps.

Alicia
0
 

Author Comment

by:mrevillaatico
ID: 33621719
@Spike99

The old printers were being setup via a policy created on windows server 2008 as a per user. This was done through Group Policy Management and the applied to the specific user OUs.

What I did this time was create a blank policy and then use the deploy through group policy option directly from the printer, and linked to that new policy. We also are now doing it as per machine vs per users. There was an issue with slower logon times and also Citrix login issues with the per users.

I personally have never done any VB scripting.
0
 
LVL 16

Accepted Solution

by:
Spike99 earned 500 total points
ID: 33621889
We had to use the VB script in our environment because we users can't use regedit.

If you don't restrict access to regedit, you could probably accomplish the same task using a BATCH file that imports the REG file that will delete the entries you want to remove..

Here are some articles on how to delete and add registry entries using REG files:

http://support.microsoft.com/kb/310516
http://www.robvanderwoude.com/regedit.php

Alicia
0
 

Author Comment

by:mrevillaatico
ID: 33635839
it seems that removing the entries from the registry is doing the trick. Still trying to narrow down all the keys that need to be removed to make sure the "ghost" printers do not show up. Thank you for all your help.
0
 
LVL 4

Expert Comment

by:DeDeckkerAndy
ID: 34417993
I think it's because they are in your hkey_users\.default section.
Maybe previously you had added the printers and made some changes to the default profile?
Changing the system and default settings in Regional and Language settings sometimes copies a lot from your own profile to the default profile. (it's just a guess of how this may have happened)

You can remove them from the default profile by just removing the hkey_users\.default\printers\connections\.. key.

If you don't remove it from the default profile, the printer will just be readded when a 'new' user logs on that server/pc.
0
 
LVL 59

Expert Comment

by:Darius Ghassem
ID: 34636965
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0
 

Expert Comment

by:CMS-T
ID: 41548386
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

776 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