how to get getting information from multiple classes in Single Query

  • Thread starter Manoj Chanchawat
  • Start date
M

Manoj Chanchawat

Hey,

PLease go thru the below mail if required

But in the class like "Win32_SoftwareFeatureAction" class, we are having the
references of the two classes: ref:CIM_Action , ref:Win32_SoftwareFeature

in the instance set i get the string output for both the columns like:
ref:CIM_Action=
{D201B520-1AE1-11D4-A2A3-00500409B678}InprocServer32{11DCC808-9C43-4C01-AA72-9E46E1FE2087}

ref:Win32_SoftwareFeature=
Win32_SoftwareFeature.IdentifyingNumber="{11DCC808-9C43-4C01-AA72-9E46E1FE2087}",Name="CoreClientComponents",ProductName="bv-Control
for Windows",Version="8.50.0.100"



Now if i want to match the Feature and the associated Features Action
information (Like Caption) then we have to Query all the three classes:

Win32_SoftwareFeature , Win32_SoftwareFeatureAction & CIM_Action



My question is:

1. Do we have any method where we can get the reference of the class
CIM_Action in the above information instead of the String output. [i was
just thinking that if i get the reference of these classes then i could get
the information from CIM_Action in a single query!!! can we do that???]

2. Is there any way where i can have information of all the features along
with their actions(Action Caption) in a single Query (Without having three
different Queries on three different classes and then matching every feature
and their associated Action information)



thanks & regards,

Manoj





Hi,

You can use this association class to match products and their features:

Win32_ProductSoftwareFeatures

This is potentially very powerful and should have been an excellent WMI
facility. However, there are SERIOUS problems with WMI's implementation
of the MSI classes, and if you try to use this in a production
environment or end-user machines you will run into problems. Microsoft
also implies the MSI provider is not going to be supported in future,
and we believe it's not even registered by default in Windows Server
2003. The underlying provider is also very slow and inefficient when
running from within WMI - it enumerates the same keys in the registry
over and over and over and over and over again.
 
M

Manbinder Pal Singh [MSFT]

Win32_SoftwareFeature
The Win32_SoftwareFeature WMI class represents a distinct subset of a
product that consists of one or more software elements. Each software
element is defined in a Win32_SoftwareElement instance, and the association
between a feature and its Win32_SoftwareFeature instance is defined in the
Win32_SoftwareFeatureSoftwareElements association class.

So to get all the features you should simply use Win32_SoftwareFeature



Thanks,
Manbinder Pal Singh

This posting is provided "AS IS" with no warranties, and confers no rights.


Manoj Chanchawat said:
Hey,

PLease go thru the below mail if required

But in the class like "Win32_SoftwareFeatureAction" class, we are having
the references of the two classes: ref:CIM_Action ,
ref:Win32_SoftwareFeature

in the instance set i get the string output for both the columns like:
ref:CIM_Action=
{D201B520-1AE1-11D4-A2A3-00500409B678}InprocServer32{11DCC808-9C43-4C01-AA72-9E46E1FE2087}

ref:Win32_SoftwareFeature=
Win32_SoftwareFeature.IdentifyingNumber="{11DCC808-9C43-4C01-AA72-9E46E1FE2087}",Name="CoreClientComponents",ProductName="bv-Control
for Windows",Version="8.50.0.100"



Now if i want to match the Feature and the associated Features Action
information (Like Caption) then we have to Query all the three classes:

Win32_SoftwareFeature , Win32_SoftwareFeatureAction & CIM_Action



My question is:

1. Do we have any method where we can get the reference of the class
CIM_Action in the above information instead of the String output. [i was
just thinking that if i get the reference of these classes then i could
get the information from CIM_Action in a single query!!! can we do
that???]

2. Is there any way where i can have information of all the features
along with their actions(Action Caption) in a single Query (Without having
three different Queries on three different classes and then matching every
feature and their associated Action information)



thanks & regards,

Manoj





Hi,

You can use this association class to match products and their features:

Win32_ProductSoftwareFeatures

This is potentially very powerful and should have been an excellent WMI
facility. However, there are SERIOUS problems with WMI's implementation
of the MSI classes, and if you try to use this in a production
environment or end-user machines you will run into problems. Microsoft
also implies the MSI provider is not going to be supported in future,
and we believe it's not even registered by default in Windows Server
2003. The underlying provider is also very slow and inefficient when
running from within WMI - it enumerates the same keys in the registry
over and over and over and over and over again.

Manoj said:
hey,

WMI has a class Win32_SoftwareFeatureParent to get the feature parent of
any
instance. For a particualr feature if i want to know its parent then i
can
fire a query:

ASSOCIATORS OF
{Win32_SoftwareFeature.IdentifyingNumber="{11DCC808-9C43-4C01-AA72-9E46E1FE2087}",Name="BVPatchDeployment",ProductName="bv-Control
for Windows",Version="8.50.0.100"} WHERE AssocClass =
Win32_SoftwareFeatureParent

But what should be the query for getting intances of all the features and
not a particular feature? I want to get feature parent of all the feature
of
all the features in one single query?

Regards
Manoj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top