Solved

Turn on a printer from a program ?

Posted on 2008-10-21
4
355 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

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
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…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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