[wpkg-users] RFC: WMI checks

Rainer Meier r.meier at wpkg.org
Wed Oct 10 08:29:31 CEST 2012

Hi Malte,

On 09.10.2012 14:14, Malte Starostik wrote:
> Example usage:
> <check type="wmi" condition="exists"
> path="Win32_QuickFixEngineering.HotFixID='KB976902',ServicePackInEffect=''"/>
> One obvious enhancement would be to a "condition" that allows for "path" to
> contain a complete WQL query. But before considering this further and what
> combinations of condition/path/value would make sense, I'd like to check if
> there is any interest in this at all and if it has a chance to make it into WPKG.
> I'm aware that execute checks with wmic or custom scripts can be used here, but
> such an approach would come with a very high performance penalty when it's
> trivial to run the check right from WPKG.

Actually the idea is good from my point of view. Especially since WPKG already 
has implemented some code to query WMI, so this code could be re-used. Although 
I think the number of users of such "wmi" type checks will be pretty small I 
think it could be a valuable new feature. I think it would make sense to support 
full WMI queries in path expression only and perhaps collect a couple of "nice 
to know" samples on WPKG wiki.
Certainly it could make sense to support also "equals" condition or similar to 
compare the results to a regular expression in "value" attribute.

I am currently quite loaded with other tasks but I will definitely return and 
add some improvements. If you have some working sample code you can probably 
send it to me. Else I will very likely think about an implementation myself.

I think the code should be kept as small as possible and only cover basic 
use-cases. For more complex operations it's likely still more advisable to use 
exec style checks and write some decent script which handles WMI query, error 
handling, parsing and return values.


More information about the wpkg-users mailing list