Link to home
Start Free TrialLog in
Avatar of stewart_A
stewart_A

asked on

Need a script to check networked printer status.

Hi there,

I dont know if this can be done or not. Basically in our company we have only HP printers which all have printer status pages when you type in the IP address into internet explorer. What i would like to do is list the printers on the local intranet and display next to each the current status. so it would look something like....

HP 4650 - Colour                          Printing
HP 3700 - Colour                          Ready/Idle

Is there a way to do this??

Thanks,
Stewart
Avatar of zoofan
zoofan
Flag of United States of America image

Pretty much everyting under the sun for scripting with printers here.

http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/printing/servers/


zf
ASKER CERTIFIED SOLUTION
Avatar of zoofan
zoofan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One more for good mesure,

If your printer is on a print server(not a stand alone jet direct)

http://www.computerperformance.co.uk/vbscript/wmi_printer.htm

zf
Avatar of stewart_A
stewart_A

ASKER

Hi there Zoofan,

Thanks for the speedy reply, using VBScript is ideally the way i would like to go although how would i implement the code shown in your second answer there.

I copied and saved it into the server directory and called it printer.asp but it doesnt work.

Help :(

Stewart
I dont mean to sound off, but make sure you have file extensions showinf when you rename file ext.  other wise windows will append it with ie printer.vbs.txt

also the file extension for vbscript is vbs  not asp


zf
Renaming the file with the correct extension should allow you to run it.

"printer.asp"

should be printer.vbs

zf
Did that get you running?

zf
no i'm afriad not, when i try to run it it comes up with an error saying....

Object Doesn't support this property or method: 'objPrinter.Status'
From script #2
"Display print queue status (VBScript)"

You did modify

Set objPrinter = GetObject("WinNT://DC1/stores_hp4000")

to your domain and printer?  and realize this is for a server sharing a printer not a jetdirect printer.


zf
Ah i see, yes i did that only i just put the name of the printer in there and the domain. The Printers are networked however they dont have a server that i know of they are just configured for use on the network then plugged in so to speak. We connect to them using a local TCP/IP connection.

Actually though if you have these printers installed at the PC your working on relpace the
Set objPrinter = GetObject("WinNT://DC1/stores_hp4000")  with your PCname and Local printer name it should still work.  Will also look into accessing the printer directly but need to step out for bit.


zf
Did you get this doing what you need it too?

zf
After a bit of head scratching i have got this pretty much working just needs some final tweaks and it should be running great!

Thanks for your comments!
Glad you got it going, was wondering if you needed help with it.

cheers

zf