Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. USB Printer Registry Association [modified]

USB Printer Registry Association [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminregex
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    switang
    wrote on last edited by
    #1

    Here's what I need to associate, you will need a printer installed to see similar results as mine. ASSOCIATION_1 ------------------------------------------------------------------------------ - Go to here: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbprint\Enum] If you have a printer installed it should show up here. The data for value "0" is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum]. I.E. - "0"="USB\\Vid_04b8&Pid_0007\\LFP26060525212949-" The last part of the data of "0" is the printer usb serial number (LFP26060525212949-) to my knowledge. This key/serial number is the first part of the association that is needed. So ASSOCIATION_1: "LFP26060525212949-" ASSOCIATION_2 ----------------------------------------------------------------------------------------- - Go to here: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName] PrinterName would be the name of the printer(s) installed, as seen in "Printers and Faxes". So ASSOCIATION_2: "PrinterName" (I.E. Epson 4800). FYI: The DeviceInstanceId value's data under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName\PnPData] for the particular printer is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum]. So if I could associate a printer's usb serial number to its name in "Printers and Faxes". That would be "Fantastic". I've tried several ways to no avail. Really a virtual printer port name to usb serial number match would work too. I assume windows does this association somehow... :confused: Thanks. -- modified at 14:46 Friday 10th November, 2006 BTW: You're doing good if you figure this one out. :-D

    V S 2 Replies Last reply
    0
    • S switang

      Here's what I need to associate, you will need a printer installed to see similar results as mine. ASSOCIATION_1 ------------------------------------------------------------------------------ - Go to here: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbprint\Enum] If you have a printer installed it should show up here. The data for value "0" is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum]. I.E. - "0"="USB\\Vid_04b8&Pid_0007\\LFP26060525212949-" The last part of the data of "0" is the printer usb serial number (LFP26060525212949-) to my knowledge. This key/serial number is the first part of the association that is needed. So ASSOCIATION_1: "LFP26060525212949-" ASSOCIATION_2 ----------------------------------------------------------------------------------------- - Go to here: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName] PrinterName would be the name of the printer(s) installed, as seen in "Printers and Faxes". So ASSOCIATION_2: "PrinterName" (I.E. Epson 4800). FYI: The DeviceInstanceId value's data under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName\PnPData] for the particular printer is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum]. So if I could associate a printer's usb serial number to its name in "Printers and Faxes". That would be "Fantastic". I've tried several ways to no avail. Really a virtual printer port name to usb serial number match would work too. I assume windows does this association somehow... :confused: Thanks. -- modified at 14:46 Friday 10th November, 2006 BTW: You're doing good if you figure this one out. :-D

      V Offline
      V Offline
      VonHagNDaz
      wrote on last edited by
      #2

      Yeah, I've had a similar problem. I need to come up with a way to associate a USB port to a specific printer when multiple printers of the exact same type are plugged into the same machine. I've tried going through the registry, but after searching and diving through it many times I couldn't find any correlation. Is this even possible? It appears that WinBlows can do it, but are they using some sort of super secret magic or a printer fairy to get this done?

      I win because I have the most fun in life...

      1 Reply Last reply
      0
      • S switang

        Here's what I need to associate, you will need a printer installed to see similar results as mine. ASSOCIATION_1 ------------------------------------------------------------------------------ - Go to here: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbprint\Enum] If you have a printer installed it should show up here. The data for value "0" is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum]. I.E. - "0"="USB\\Vid_04b8&Pid_0007\\LFP26060525212949-" The last part of the data of "0" is the printer usb serial number (LFP26060525212949-) to my knowledge. This key/serial number is the first part of the association that is needed. So ASSOCIATION_1: "LFP26060525212949-" ASSOCIATION_2 ----------------------------------------------------------------------------------------- - Go to here: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName] PrinterName would be the name of the printer(s) installed, as seen in "Printers and Faxes". So ASSOCIATION_2: "PrinterName" (I.E. Epson 4800). FYI: The DeviceInstanceId value's data under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName\PnPData] for the particular printer is a reg location under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum]. So if I could associate a printer's usb serial number to its name in "Printers and Faxes". That would be "Fantastic". I've tried several ways to no avail. Really a virtual printer port name to usb serial number match would work too. I assume windows does this association somehow... :confused: Thanks. -- modified at 14:46 Friday 10th November, 2006 BTW: You're doing good if you figure this one out. :-D

        S Offline
        S Offline
        switang
        wrote on last edited by
        #3

        I didn't think I would get any help on this one... :sigh:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups