|
|
![]() |
|
|
Top | #1 |
|
Glaanies script monkey
Joined: February 2003
Location: Chicago
Posts: 2,725
Reputation: 1520
Power: 155 |
|
|
|
|
|
|
Top | #2 |
|
Carbon based lifeform
Joined: February 2004
Location: SoCal
Posts: 3,406
Reputation: 2305
Power: 158 |
Could he do an lpstat -p?
|
|
|
|
|
|
Top | #3 |
|
XPista7eopard*ix
Joined: April 2004
Location: Chicagoland
Posts: 4,028
Reputation: 2947
Power: 168 |
i'm still not quite sure what he's trying to do.. his batch file "example" makes no sense..
what is this doing? Code:
%SystemRoot%\pv.exe > result.txt Code:
call You Have Left The Printer On.vbs Going by what he said, he could create a vbscript file to run as a shutdown script.. The template below will check the status of the printer and display a box with just an OK button telling him to shut off the printer. If he were to, say, go into his local policies and add the script as a shutdown script, it should run.. not sure if/how the message box will display or not in the middle of a shutdown though. objPrinter.PrinterStatus=3 is the "ready" printer state strPrinter should be set to the name of the printer strComputer really isn't necessary as it is just the local PC.. force of habit for me. Code:
'run at shutdown to check the status of a printer
Option Explicit
Dim objWMI, objPrinter, colPrinters, strComputer,strPrinter,strWMIQuery
strComputer = "."
strPrinter = "Some Printer Name"
strWMIQuery = "SELECT * FROM Win32_Printer WHERE name=""" & strPrinter & """"
set objWMI = GetObject ("winmgmts:\\" & strComputer & "\root\CIMV2")
set colPrinters = objWMI.ExecQuery(strWMIQuery)
for each objPrinter in colPrinters
if not(objPrinter.PrinterStatus=3) then
msgbox "Turn off the Printer!",0,"Printer Is Still On!"
end if
next
wscript.quit
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Online Status | Techno Child | Site Problems & Feedback | 6 | June 12th, 2006 12:31am |
| Status Update | Electronic Punk | Site Problems & Feedback | 57 | November 9th, 2003 3:46am |
| Status Bar | i_pedal | Windows Desktop Systems | 7 | July 31st, 2003 2:28pm |
| I.E status Bar Gone | psx2000 | Windows Desktop Systems | 2 | April 9th, 2003 2:31am |
| status bar in IE | npfanz | Windows Desktop Systems | 3 | February 18th, 2002 12:54pm |