How to find the printer to virtual port mapping

jason987
jason987 used Ask the Experts™
on
Windows Vista/XP/7

I am trying to figure out if there is a (hopefully built into windows/command line) way to identify which device is associated with the virtual printer ports.   The example would be that if I attached a hub with 5 printers windows would create USB001-5 but it would not attach the printer to that port (at least in the UI) until I installed a driver.  I am trying to setup automated driver installation so I will not have the ability to go through the normal steps of installation walkthrough.

I have the utilities to see the USB bus but that simple shows the bus data not the virtual port stuff with windows.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Whenever you plug in a printer, during the driver installation windows creates virtual usb ports for that printer. so nest time, if you plug in you will not go with the printer installation again. it will automatically assign to the virtual ports created for that printer during the first installation.

Are you looking for tools like demon tools which creates Vitual CD\DVD drives as same for printers????

Author

Commented:
Yea, that's clear to me.  The issue is that without the auto install I don't know where to pull the association.
Commented:
I actually found it:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBPRINT

A reg key is automatically set there when a device is connected and there is a sub key identifying the port.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial