Re: Using EMI for remote printer info
From: Corné Bogaarts (does.not.exist_at_bigfoot.com)
Date: 12/23/04
- Next message: Michael Harris \(MVP\): "Re: Keep Script CLI window open"
- Previous message: Gabe - GMail: "Re: run commands at remote servers"
- In reply to: Conic Ellipse: "Using EMI for remote printer info"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Dec 2004 20:28:32 +0100
>From the results you describe, I get the impression that you're
getting the printers that are installed on the computer, not the ones
that are connected.
You may have to use a different WMI-object to get the desired results.
On Wed, 22 Dec 2004 06:21:01 -0800, "Conic Ellipse"
<ConicEllipse@discussions.microsoft.com> wrote:
>Howdy all. I used Scriptomatic to create a script that will show me all about
>printers installed on a machine using WMI. The script works on my machine,
>but when I try to use it on another workstation on my enterprise, I only get
>information about 'software' printers on the machine and not the network
>printers they have attached to them. Again, I can see the network printers
>when I run it on mine, but not on theirs (by putting in their machine name in
>place of the . for the strComputer name while running the script on my
>computer.)
>
>Remote servers actually show correct information. It appears to be just
>workstations that are not working.
>
>Any ideas on how I can correctly get the data from the 'remote' workstations?
>
>Thanks, here's a snipet from the Scriptomatic:
>
>On Error Resume Next
>strComputer = "."
>Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
>Set colItems = objWMIService.ExecQuery("Select * from Win32_Printer",,48)
>For Each objItem in colItems
> Wscript.Echo "Name: " & objItem.Name
> Wscript.Echo "DriverName: " & objItem.DriverName
> Wscript.Echo "ShareName: " & objItem.ShareName
>Next
>
>If it matters, it is failing on remote machines using Windows 2000 up to SP4
>AND Windows XP SP1 and 2.
>
>-=Conic=-
--- --- --- --- --- --- ---
Most answers can be found in the Schedule+ FAQ: http://www.xs4all.nl/~bogaarts/schdmenu.htm.
Please reply to the newsgroup. For reasons of Spam, I won't be including my E-mail address anymore.
- Next message: Michael Harris \(MVP\): "Re: Keep Script CLI window open"
- Previous message: Gabe - GMail: "Re: run commands at remote servers"
- In reply to: Conic Ellipse: "Using EMI for remote printer info"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|