Hkey_current_user Software Microsoft Windows Nt Currentversion Printer Ports

I have successfully migrated all printers to a new server(VM).
The only other issue i have is, keeping everyone's default printers and the printers they currently have in their 'Devices & Printers'. The names of the printers are staying the same.
I want to have these ports moved over to the new server and users never knew i migrated these printers.(Scenario: Migration is done, Old print server is shut down and new one is up, user's printers that have already been added before in 'Devices & Printers' stay the same and are able to print from the printer they already had in 'Devices & Printers'.)
I noticed that there is an option to export printer ports in Print Management GUI. Does this apply to also keeping the same printers in the users 'Devices & Printers' or is this something else?
Also, Is there a way to transfer users printer in 'Devices & Printers' that are NOT set to defaults? Basically transition existing printers in 'Devices & Printers' to the same ones added but essentially in the 'background', they are different. The ports are pointing to the server, but i now need to point users printers back to the new printer.
How can i make this happen? It is not ideal for us to have users re-add all the printers in 'Devices & Printers'.

Jul 11, 2013  HKEY_CURRENT_USER Software Microsoft Windows NT CurrentVersion Devices The registry entries for redirected printers are deleted when the users disconnect or log off. However, other. HKEY_CURRENT_USER Software Microsoft Windows NT CurrentVersion PrinterPorts is accumulating redirected printers on our terminal server, The server OS is windows.


I appreciate you help.
Thank you,
Jonathan


Edited by JasonBourne2, 28 June 2016 - 01:23 PM.

Active5 years, 9 months ago

I have an application that uses an old reporting library (ReportPro). On Windows 7 64, it sometimes fails to find the default printer. I did some digging and found the problem in the windows registry. ReportPro determines the available printers via the GetProfileString windows API. It gets a list of available printers from here:

It gets the default printer from here:

What I'm seeing in the windows registry is the the list of printers will show the name and the network port we are using as:

On some systems the value of the default printer string is different. It would be something like:

388 rows  If Windows Update is disabled, go to the HP.com, download the HP LaserJet USB (DOT4) communication driver for Windows from hp.com, load the HP PCL6 driver into the driver store, and then connect the USB cable. Download the latest driver, firmware, and software for your HP LaserJet Enterprise P3015 Printer.This is HP's official website to download drivers free of cost for your HP Computing and Printing products for Windows and Mac operating system. The Driver Update Tool – is a utility that contains more than 27 million official drivers for all hardware, including hp laserjet p3010 driver. HP LaserJet P3010 Driver Windows 10 Download Support driver, software, installation, windows, mac os x, linux, full features, package, free full, features. Hp laserjet p3010 driver download windows 10.

HP LaserJet 5200 Series PCL 5 on Ne01:

In particular the NExx number is different in the default printer value compared to the list of printers.

The report package fails to find a default printer as it uses the printer name and the NExx number in the comparison.

Why would the NExx values be different and how do I make sure the values 'stick'? The solution I have found for the moment is to set a different printer as default and then choose the correct default printer. That seems to resolve the problem temporarily but it is not permanent. Download drivers for hp pavilion zd8000.

This problems seems to be Win7 only. Several of the XP machines have never had this problem in the last 8 years.

Hugh
HughHugh

1 Answer

The recommended method for retrieving the default printer is to use the Windows API GetDefaultPrinter() API rather than reading the registry. The recommended method for retrieving the list of all printers is to use EnumPrinters(). If you modify your code to use the Windows APIs instead of directly reading the registry, it should work reliably on Windows 7.

Craig LebakkenCraig Lebakken

Hklm Software Microsoft Windowsnt Currentversion Profilelist

Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Hkcu Software Microsoft

Not the answer you're looking for? Browse other questions tagged windowsdelphiprinting or ask your own question.