Mapping a printer via the registry

0

0

Is it possible to map a printer via the registry in a windows 7 environment?

What I mean is, you have information on the printer in the registry:

  • List of printers: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts
  • Default printer: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
  • Printers themselves: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers
  • More printer info: HKEY_CURRENT_USER\Printers

There are all these different types of registry entries for printers, so it seems that it would be possible to map the printer by the registry itself. Is this possible?

13aal

Posted 2017-04-19T11:40:00.833

Reputation: 153

@JulianKnight that just gives me information on where the keys sit, not if you can map a printer by the registry – 13aal – 2017-04-19T11:44:36.683

1That's why it isn't an answer ;-) Try adding one the normal way, compare the registry keys, remove it, then add via the registry. You can definitely remotely add a printer using GPO so I fully expect you can do it via registry. – Julian Knight – 2017-04-19T12:46:11.713

@JulianKnight lol smart ass. How can you add through GPO..? – 13aal – 2017-04-19T12:51:56.270

1Don't know I'm afraid, I'm not an expert in SCOM/SCCM, you'd have to look it up. If you have W7 pro or enterprise, you should have a GPO editor installed. – Julian Knight – 2017-04-19T13:03:00.920

Answers

1

This works well with UNC path connected printers, but the drivers have to be present on the system in order for it to be seamless.

I've not had the same luck with TCP/IP port connected printers.

Nicholas D

Posted 2017-04-19T11:40:00.833

Reputation: 11

So I could do it with a UNC printer, as long as I have the path to it? How so? – 13aal – 2017-04-19T18:19:33.623

I usually manually connect the printer initially and then export the registry key HKEY_CURRENT_USER\Printers to use for further deployment. The registry key is a bit in depth, so it would be much more difficult to manually create the .reg file that the export creates for ya! – Nicholas D – 2017-04-19T18:24:41.130

I don't have the option to manually connect the print, I would need to map the printer via IP to the registry – 13aal – 2017-04-19T20:33:44.080

Take a gander at this: http://iwan-it-admin-tips.blogspot.com/2009/01/registry-key-for-tcp-ip-printer-port.html

– Nicholas D – 2017-04-21T12:39:42.480