473,320 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

WMI for Printer Status??

I'm trying to grab printer status for a printer with WMI

I got a mo("PrinterState").tostring of "128" for a paused HP printer. What
is "128" equate to? It did give a mo("PrinterStatus").tostring of 1 =
"paused" which was correct but it took a while to display the correct state.

When I un-paused the printer, I got a mo("PrinterState").tostring of "0".
What is "0" equate to? It got a mo("PrinterStatus").tostring of 0. Is "0"
mean ok, ready?

Anyone had experience in correctly grabbing info from WMI?

I'm getting info but not consistent info and i don't know how to translate
the codes since they don't match up with the ones in the WMI SDK.
Any clues as how to effectively use
Management.ManagementObjectSearcher("Select * from Win32_Printer")

to get accurate info on networked printers within a domain?

TIA

Harry
Nov 20 '05 #1
2 6415
I don't know the answer, but you might try posting in
microsoft.public.dotnet.fromework.wmi newsgroup

Good Luck

"Harry Simpson" <hs*******@nospamphgt.net> wrote in message
news:ew**************@tk2msftngp13.phx.gbl...
I'm trying to grab printer status for a printer with WMI

I got a mo("PrinterState").tostring of "128" for a paused HP printer. What
is "128" equate to? It did give a mo("PrinterStatus").tostring of 1 =
"paused" which was correct but it took a while to display the correct state.
When I un-paused the printer, I got a mo("PrinterState").tostring of "0".
What is "0" equate to? It got a mo("PrinterStatus").tostring of 0. Is "0" mean ok, ready?

Anyone had experience in correctly grabbing info from WMI?

I'm getting info but not consistent info and i don't know how to translate
the codes since they don't match up with the ones in the WMI SDK.
Any clues as how to effectively use
Management.ManagementObjectSearcher("Select * from Win32_Printer")

to get accurate info on networked printers within a domain?

TIA

Harry

Nov 20 '05 #2
I don't know the answer, but you might try posting in
microsoft.public.dotnet.fromework.wmi newsgroup

Good Luck

"Harry Simpson" <hs*******@nospamphgt.net> wrote in message
news:ew**************@tk2msftngp13.phx.gbl...
I'm trying to grab printer status for a printer with WMI

I got a mo("PrinterState").tostring of "128" for a paused HP printer. What
is "128" equate to? It did give a mo("PrinterStatus").tostring of 1 =
"paused" which was correct but it took a while to display the correct state.
When I un-paused the printer, I got a mo("PrinterState").tostring of "0".
What is "0" equate to? It got a mo("PrinterStatus").tostring of 0. Is "0" mean ok, ready?

Anyone had experience in correctly grabbing info from WMI?

I'm getting info but not consistent info and i don't know how to translate
the codes since they don't match up with the ones in the WMI SDK.
Any clues as how to effectively use
Management.ManagementObjectSearcher("Select * from Win32_Printer")

to get accurate info on networked printers within a domain?

TIA

Harry

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: rbt | last post by:
Hello there, Depending on the firmware version of the HP printer and the model type, one will encounter a myriad of combinations of the following strings while reading the index page: hp HP...
7
by: Jim Warner | last post by:
I am having problems using Borland 5.02 C/C++ for testing printer status repeatly. I wish to use my printer to detect off-line, removing paper, and so on with my software. I have tried using...
0
by: Gordon Truslove | last post by:
I've been trying to get the printer status using GetPrinter and Printer_Info_2 I'm getting closer, but it still fails. Error 122 - The data area passed to a system call is too small. ...
3
by: Gordon Truslove | last post by:
I've been trying to get the printer status using GetPrinter and Printer_Info_2 I'm getting closer, but it still fails. Error 122 - The data area passed to a system call is too small....
0
by: cortukmehmet | last post by:
I wrote this code to check the status of printer.But it says "Unknown" as printer. /////////////////////////////////////////////////////////////////////////////...
1
by: Vanessa | last post by:
Hi, I'm trying to select a printer in the system printers collection. I'm able to do this. However, if the printer is a network printer and happens that this printer is not on or not ready, I...
6
by: Pipo | last post by:
Hi, Does anyone know how I can read out the printer status? I want to sent a bulk of documents to the printer (or 1 by 1) but if something goes wrong e.g. out of paper, cartridge empty, tray...
2
by: TARUN | last post by:
Hello all, Please help and suggest the code to get the printer status over the network. for Example, i have an string "\\\\os1\\PtName" where os1 is the system name and PtName is the printer...
9
by: id10t error | last post by:
Hello, I am going to be using a Symbol WT4090 to scan items. I need to printer a tag from the Zebra ql320 plus. I am trying to do this is Visual basic 2005. Does anyone know and good site to...
1
by: Steve | last post by:
Hi All I am using vb.net 2005 in a windows forms application I send data to the selected windows printer using a PrintDocument object Is there any way to detect if the Printer is not...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.