?
Solved

Turn on a printer from a program ?

Posted on 2008-10-21
4
Medium Priority
?
361 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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