473,811 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WMI for Printer Status??

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

I got a mo("PrinterStat e").tostring of "128" for a paused HP printer. What
is "128" equate to? It did give a mo("PrinterStat us").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("PrinterStat e").tostring of "0".
What is "0" equate to? It got a mo("PrinterStat us").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.Mana gementObjectSea rcher("Select * from Win32_Printer")

to get accurate info on networked printers within a domain?

TIA

Harry
Nov 20 '05 #1
2 6458
I don't know the answer, but you might try posting in
microsoft.publi c.dotnet.fromew ork.wmi newsgroup

Good Luck

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

I got a mo("PrinterStat e").tostring of "128" for a paused HP printer. What
is "128" equate to? It did give a mo("PrinterStat us").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("PrinterStat e").tostring of "0".
What is "0" equate to? It got a mo("PrinterStat us").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.Mana gementObjectSea rcher("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.publi c.dotnet.fromew ork.wmi newsgroup

Good Luck

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

I got a mo("PrinterStat e").tostring of "128" for a paused HP printer. What
is "128" equate to? It did give a mo("PrinterStat us").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("PrinterStat e").tostring of "0".
What is "0" equate to? It got a mo("PrinterStat us").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.Mana gementObjectSea rcher("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
2111
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 color Color
7
4308
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 bio_print, bios_printer, and bio_serialcom but my program cannot detect it. I am using Windows XP and I have read that these functions can't be used since Windows 98 operating system will not support the functions. Can you help show a simple program...
0
1918
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. public struct PRINTERINFO2
3
10068
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. --------------------------------------------------------------- public struct PRINTERINFO2
0
2365
by: cortukmehmet | last post by:
I wrote this code to check the status of printer.But it says "Unknown" as printer. ///////////////////////////////////////////////////////////////////////////// System.Management.ManagementObjectCollection printers = new System.Management.ManagementClass("Win32_Printer").GetInstances(); foreach(System.Management.ManagementObject printer in printers) {
1
18192
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 won't be able to know and I try to print a document I will get an error. Is there anyway that I can check the status for the printer that the user select is ready or not?
6
2403
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 open,etc I would like to get an exception back. Is this possible? tia
2
4245
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 name I need to know the status of this printer on the system name "os1".
9
10390
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 find out how to do this. I have looked everywhere i know with no luck. Thank you in advance for your help.
1
4233
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 responding e.g turned off, out of paper etc, via code I want to display a warning if the printer needs attention rather than just
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.