Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

printer serial numbers

25 views
Skip to first unread message

benoit DUQUESNE

unread,
Nov 17, 2020, 2:21:28 AM11/17/20
to
Hi,
Is it possible to make a VBSCRIPT (for Windows 10) which can recover in a TXT file the serial numbers of the printers installed on a station ?

Thank you

Evertjan.

unread,
Nov 17, 2020, 5:20:51 AM11/17/20
to
benoit DUQUESNE <ledu...@gmail.com> wrote on 17 Nov 2020 in
microsoft.public.scripting.vbscript:

> Is it possible to make a VBSCRIPT (for Windows 10) which can recover in
> a TXT file the serial numbers of the printers installed on a station ?

Yes. Any computerlanguage can parse a textfile.

Better hire a programmer.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

JJ

unread,
Nov 18, 2020, 8:18:10 AM11/18/20
to
Wait, what? Since when did printers have software-readable serial number?

Mayayana

unread,
Nov 18, 2020, 9:25:26 AM11/18/20
to
"benoit DUQUESNE" <ledu...@gmail.com> wrote

| Is it possible to make a VBSCRIPT (for Windows 10) which can recover in a
TXT file the serial numbers of the printers installed on a station ?
|

That would imply a software serial number and not
just a hardware serial number. Are you sure such a thing
exists? Serial numbers are usually listed on stickers.
For what it's worth, you can get some info via WMI,
but these are the only identifying properties I found
for printers:

'---------------------------------
Dim WMI, Col, Ob, S2
On Error Resume Next
Set WMI = GetObject("WinMgmts:")

Set Col = WMI.ExecQuery("Select * from Win32_Printer")
For Each Ob in Col
S2 = S2 & "Product Name: " & Ob.DeviceID & vbCrLf
S2 = S2 & "Product Version: " & Ob.DriverName & vbCrLf
S2 = S2 & "Product Description: " & Ob.PNPDeviceID & vbCrLf
Next

Set Col = Nothing
Set WMI = Nothing
MsgBox S2
'--------------------------------

On my system it returns the following:


Product Name: Microsoft XPS Document Writer
Product Version: Microsoft XPS Document Writer
Product Description:
Product Name: HP ENVY 5660 series
Product Version: HP ENVY 5660 series
Product Description:
Product Name: CutePDF Writer
Product Version: CutePDF Writer
Product Description:

Not very useful. You can also connect to a printer
scanner via WIA, but I don't see anything there
about serial numbers. Microsoft are fanatic about
identifying hardware and WMI provides options for
most onboard hardware elements, so I'm guessing printers
don't have a software ID.

You can access most/all printer settings and the printer
driver via WMI, but I don't see anything about unique
IDs.

If you want to pursue that, there should be a wmisdk.hks
file in the Win32 SDK. If you don't want to install that whole
mess the hxs can be extracted and converted to CHM. If
you start getting into WMI you'll want the help. It's a
very extensive system that's been very poorly designed.
There's nothing obvious or intuitive, and as you can see
above, it's not so much an object model as a fake SQL
database. Crazy stuff.


0 new messages