Hello everyone,
I have a problem and maybe one of you is able to give me a hint, I have to package a HP driver suite for the model: HP Officejet Pro 8500 A910.
The package is nearly finished and the only thing where I am stucked is, that I have to check the printer status before uninstalling the package.
If I try to uninstall when the printer is connected the uninstall is not succesful, so I have to check if the printer is connected and if it is, I'll inform the user to unplug the damn thing from the USB.

I'll mention that I've google it, and I found some stuff but no script so far, worked in my case.

Cheers,
D.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Funny, because I Googled 'vbscript printer connected', browsed the second hit and got this.

Hard to know what other info you might want from a printer that isn't there, other than how thick the dust is on it...
Answered 01/11/2011 by: VBScab
Red Belt

Please log in to comment
0
Point "well made" (again) Scab about google being your friend BUT is it not better for this forum to be a "One Stop Shop" and to assist people with their problems instead of having to Google everything? If this was the case there would be no forums like this as all of the responses on it would be ... "Google it",....lets face it ...it wouldn't be a very good forum.
Answered 01/12/2011 by: newdude
Senior Yellow Belt

Please log in to comment
0
Well Steve, since it looks to me like Ian actually googled it FOR the OP, and then pointed out the most promising result, I'd say job well done. No need imo to copy/paste the actual scripts here again, if you can just point to where to find it..

my 2c

PJ
Answered 01/12/2011 by: pjgeutjens
Red Belt

Please log in to comment
0
sry for my late response, but as I mentioned in my post I said I did googled the issue, and what I found didnt worked for my problem.
That script which you found it, it works only if the printer is not installed YET, but in my case I have the printer isntalled and I have to check its status --> either its plugged or not in the USB ( Offline or Online). None of the Win32_Printer querries are returning any relevant information that could help me found out what I need.
The printer either is plugged or not ( Offline or Online status in Printer & Devices) if I querry Win32_Printer :PrinterStatus I alway get the Idle 'value'..so this is plain zero for me.
I found some more advanced stuff related to this which concerns some API calls, but I'm not sure if this can be handled via simple VBscript..

So if anyone can give me a hint ( not a complete solution lol) or some head start from another point than what you can find from the first result pages from google, feel free to share :)
Answered 01/14/2011 by: dryce
Senior Yellow Belt

Please log in to comment
0
it works only if the printer is not installed YETEh?!? Explain how a script can retrieve Description, Driver name, horizontal and vertical resolution for a printer which isn't installed.

Ahm oot!
Answered 01/14/2011 by: VBScab
Red Belt

Please log in to comment
2
try prnmngr.vbs in your system32 directory.
Very useful. you can type cscript prnmngr.vbs /? to get a list of valid arguments.
Also in system32 are these vbs files,
prncnfg.vbs
prndrvr.vbs
prnjobs.vbs
prnmngr.vbs
prnport.vbs
prnqctl.vbs
Check 'em out
Answered 01/14/2011 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
ORIGINAL: VBScab

it works only if the printer is not installed YETEh?!? Explain how a script can retrieve Description, Driver name, horizontal and vertical resolution for a printer which isn't installed.

Ahm oot!



:-)
What I meant is, if you just plug the printer ..ofcourse the windows recognize it and installs basic stuff --> querry those WMI classes --> you get the expected result.
IF you install all its HP suite ( for this device) --> querry WMI you get what I get --> 0

@aogilmor Thanks I'll go more deep into those.


LE: Somehow the HP Vendor MSI detects if the printer is online during uninstall ( and throws the message), and I have the feeling that the dll function used there is not querring WMI, so it must be some other way.

LLE: Well, I think I've wasted to much time on this last issue..I think I'll go with the: throw a MessageBox at the start of Uninstall, where I'll inform the user to be sure he has his device unplugged from the USB.

Thanks everyone.
Answered 01/17/2011 by: dryce
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity