[gptalk] Re: WMI Question

  • From: "Darren Mar-Elia" <darren@xxxxxxxxxx>
  • To: <gptalk@xxxxxxxxxxxxx>
  • Date: Thu, 26 Jul 2007 14:49:34 -0700

Right. And keep in mind that build number doesn't change for a given major
release (i.e. all versions of XP are build 2600, all Vistas are build 6000,
etc.)

 

 

 

From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx] On
Behalf Of Nelson, Jamie R Contr 72 CS/SCBAF
Sent: Thursday, July 26, 2007 1:58 PM
To: gptalk@xxxxxxxxxxxxx
Subject: [gptalk] Re: WMI Question

 

No there shouldn't be a problem with using a "generic" filter like that.
Don't know about everyone else but I do that all the time.  If you want to
target a specific build or service pack just make a separate, more detailed
filter that looks at the Build or Service Pack (CSDVersion) properties.

 

Regards,

Jamie Nelson

 

From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx] On
Behalf Of Mills, Mark
Sent: Thursday, July 26, 2007 2:31 PM
To: gptalk@xxxxxxxxxxxxx
Subject: [gptalk] Re: WMI Question

 

Is there anything "wrong" or "un professional" with using the "LIKE" command
when you are filtering with WMI for just the general OS type.  Instead of
having my filters look for the exact string I use the "like" argument so it
covers all versions and builds of XP or Vista.

 

I guess the caveat would be if you wanted to apply ( or not apply) something
to a specific build or service pack of an OS.

 

Examples:

 

WMI Filter looks for "Microsoft Windows XP" anywhere in the caption

SELECT * from Win32_OperatingSystem WHERE Caption LIKE "Microsoft Windows
XP%" 

 

WMI Filter looks "Vista" anywhere in the caption

SELECT * from Win32_OperatingSystem WHERE Caption LIKE "%Vista%"

Instead of looking for Vista's new caption "Microsoftr Windows VistaT
Enterprise"

 

For those looking for examples:  http://grouppolicy.editme.com/WMIFilters 

 

Mark Mills 

Other related posts: