Re: Query printers

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Joseph Calabig [MSFT] (jcalabig_at_microsoft.com)
Date: 09/22/04


Date: Wed, 22 Sep 2004 16:20:19 -0700

Try using HardwareInventory to report the Win32_Printer class.
Enable it in the sms_def.mof.

[ SMS_Report (FALSE),
<<<<<<<<<<<<<<<<<< set to TRUE
  SMS_Group_Name ("Printer Device"),
  SMS_Class_ID ("MICROSOFT|PRINTER_DEVICE|1.0") ]

class Win32_Printer : SMS_Class_Template
{
    [SMS_Report (FALSE) ]
        uint32 Attributes;
    [SMS_Report (FALSE) ]
        uint16 Availability;
    [SMS_Report (FALSE) ]
        uint32 AveragePagesPerMinute;
    [SMS_Report (FALSE) ]
        uint16 Capabilities[];
    [SMS_Report (FALSE) ]
        string CapabilityDescriptions[];
    [SMS_Report (FALSE) ]
        string Caption;
    [SMS_Report (FALSE) ]
        uint32 ConfigManagerErrorCode;
    [SMS_Report (FALSE) ]
        boolean ConfigManagerUserConfig;
    [SMS_Report (FALSE) ]
        uint32 DefaultPriority;
    [SMS_Report (FALSE) ]
        string Description;
    [SMS_Report (FALSE) ]
        uint16 DetectedErrorState;
    [SMS_Report (FALSE), key] <<<<<<<<<<<<<<<< set to TRUE
        string DeviceID;
    [SMS_Report (FALSE) ]
        string DriverName; <<<<<<<<<<<, set to
TRUE
    [SMS_Report (FALSE) ]
        boolean ErrorCleared;
    [SMS_Report (FALSE) ]
        string ErrorDescription;
    [SMS_Report (FALSE) ]
        uint32 HorizontalResolution;
    [SMS_Report (FALSE) ]
        datetime InstallDate;
    [SMS_Report (FALSE) ]
        uint32 JobCountSinceLastReset;
    [SMS_Report (FALSE) ]
        uint16 LanguagesSupported[];
    [SMS_Report (FALSE) ]
        uint32 LastErrorCode;
    [SMS_Report (FALSE) ]
        string Location;
    [SMS_Report (FALSE) ] <<<<<<<<<<<<<<<<< set to TRUE
        string Name;
    [SMS_Report (FALSE) ]
        uint16 PaperSizesSupported[];
    [SMS_Report (FALSE) ]
        string PNPDeviceID;
    [SMS_Report (FALSE) ]
        string PortName;
    [SMS_Report (FALSE) ]
        uint16 PowerManagementCapabilities[];
    [SMS_Report (FALSE) ]
        boolean PowerManagementSupported;
    [SMS_Report (FALSE) ]
        string PrinterPaperNames[];
    [SMS_Report (FALSE) ]
        uint32 PrinterState;
    [SMS_Report (FALSE) ]
        uint16 PrinterStatus;
    [SMS_Report (FALSE) ]
        string PrintJobDataType;
    [SMS_Report (FALSE) ]
        string PrintProcessor;
    [SMS_Report (FALSE) ]
        string SeparatorFile;
    [SMS_Report (FALSE) ]
        string ServerName;
    [SMS_Report (FALSE) ]
        string ShareName;
    [SMS_Report (FALSE) ]
        boolean SpoolEnabled;
    [SMS_Report (FALSE) ]
        datetime StartTime;
    [SMS_Report (FALSE) ]
        string Status;
    [SMS_Report (FALSE) ]
        uint16 StatusInfo;
    [SMS_Report (FALSE) ]
        string SystemName;
    [SMS_Report (FALSE) ]
        datetime TimeOfLastReset;
    [SMS_Report (FALSE) ]
        datetime UntilTime;
    [SMS_Report (FALSE) ]
        uint32 VerticalResolution;
};

Hope this helps.

-- 
Thanks,
Joseph Calabig
This posting is provided "AS IS" with no warranties, and confers no rights.
"ms" <nospam@nospammm.com> wrote in message 
news:eCr0IAPoEHA.3668@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> how can I make a query to discover what printer is installed on a computer 
> ?
> I cant find anything in the list.
>
>
> tx
>
> 


Relevant Pages

  • Re: Invalid inventory after XP SP1 Upgrade!
    ... This posting is provided "AS IS" with no warranties, ... does running the report give> you better results now? ... > Joseph Calabig ... >>>>> How are you determining which machines are reported as Gold and SP1? ...
    (microsoft.public.sms.inventory)
  • A sure remedy for the malaise overtaking this NG
    ... The group you are posting to is a Usenet group. ... Newsgroups: rec.pyrotechnics ... time for a convention! ... original | Report this message | Find messages by this author ...
    (rec.pyrotechnics)
  • Re: Expert Opinion: Mottershead Report Valid
    ... Opinion of Mottershead report submitted to the USCF ... the internal USCF member forums and their posting IP address. ...
    (rec.games.chess.politics)
  • Re: Author disputes Cuban healthcare `myths
    ... [snipping portions of PL's posting already debunked here, ... have reported that it is in line with Cuban Government ... policy to report mild cases of dengue as "influenza". ... "WHO and the PanAmerican Health ...
    (soc.culture.cuba)
  • RE: ISA Server 2000 Reports not populated with data
    ... Please check Event Log for any related (ISA reporting) error info. ... Please let me know whether there's no .ils file at all, ... This posting is provided "AS IS" with no warranties, ... >> If there's already a Report Job, please delete it and create a new one. ...
    (microsoft.public.windows.server.sbs)