USB Printer query

(imported topic written by JamesN91)

(value “printer driver” of it, value “port” of it) of keys whose (value “Port” of it as string contains “LPT” OR value “Port” of it as string contains “DOT4” OR value “Port” of it as string contains “USB”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers” of registry as string

Above is an Analysis for query of local printers. It works very well except for 1 issue. It appears to report any USB printer that has ever been attached to the workstation. Is there a way to narrow it so it will only report on currently installed local printers?

(imported comment written by SystemAdmin)

It looks like the best way to do this might be via WMI. However WMI can be slow to evaluate.

I found references to WMI examples at http://www.visualbasicscript.com/m46298.aspx

it uses the wmi query of “select * from Win32_Printer” to select them.

An alternate may be found at the following: http://www.phpbuilder.com/board/showthread.php?t=10299701

this site refers to the following two registry locations:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\LPTENUM\

and

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBPRINT\

(imported comment written by SystemAdmin)

So at one point there was a unsupported printer monitoring site that would monitor local printers and their usage. You may be able to get a hold of it if you ask real nice.

(imported comment written by jgstew)

This is related:

http://bigfix.me/analysis/details/2994741

Sound like the " printer monitoring site " could be useful for some examples if nothing else.