Avatar of mrevillaatico
mrevillaatico
 asked on

Printers keep coming back after being deleted

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,
Printers and ScannersWindows Server 2008

Avatar of undefined
Last Comment
CMS-T

8/22/2022 - Mon
insightcomputing

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

ASKER
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.
Spike99

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
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Spike99

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
mrevillaatico

ASKER
@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.
ASKER CERTIFIED SOLUTION
Spike99

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mrevillaatico

ASKER
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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
DeDeckkerAndy

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.
Darius Ghassem

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.
CMS-T

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23