Solved

Turn on a printer from a program ?

Posted on 2008-10-21
4
343 Views
Last Modified: 2013-12-15
Hello,

it is possible to turn on a printer connected via USB from a program ?

I know that from a Linux OS it is possible to turn automatically on a printer if the printer supports this feature. I made this on Red Hat with an HP 959c printer.

I need to do this with Delphi or VBSCRIPT (WMI).

Thank you !
0
Comment
Question by:enumaelis
  • 3
4 Comments
 
LVL 7

Expert Comment

by:Hubasan
ID: 22769593
Hi enumealis,

Unfortunately the method in the WMI Class "Win32_Printer" called "SetPowerState" is not implemented yet so as far as I know there is no way to set power state to the actual hardware unless you have written your own provider.

Here is the detailed explanation:

http://msdn.microsoft.com/en-us/library/aa394363(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa393485(VS.85).aspx
0
 

Author Comment

by:enumaelis
ID: 22789908
Thank you for your reply.

Ok, I saw that the method "SetPowerState" is not implemented in WMI yet.
But this could mean that there is a corresponding API, I'm right ?

I found a code example to turn off the monitor with Delphi:
DefWindowProc(Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 2);

Probably there is also  a method to turn on a monitor or a printer ?


0
 

Author Comment

by:enumaelis
ID: 22789965
I found that the "SetPowerState" method is about the system state, not for a printer...
0
 

Accepted Solution

by:
enumaelis earned 0 total points
ID: 22876099
Ok, it is not possible :-)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Causes of paper jams:The following are the main causes of paper jams. Guides:If the guides for the paper are not set correctly they may cause the paper to enter at an angle. You should ensure that the guides are set correctly for the paper type a…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now