Solved

Turn on a printer from a program ?

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

786 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