473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ROOT.CIMV2.Win32.Product spurrious error, how to fix?

Hi...

We have some code written in C# that's trying to manage a farm of servers.
It's using the WMI classes to look at the remote machine for certain
installed packages, and occasionally it blows up but I can't figure out why.
The code is

ManagementScope scope = new
ManagementScope(string.Format(@"\\{0}\root\cimv2", serverName));
scope.Connect();
foreach (Product product in ROOT.CIMV2.Win32.Product.GetInstances(scope))
{
....
}

It blows up on the MoveNext() on the enumerator sometimes but it comes and
goes.

I didn't find anything in the extended info on the ManagementException that
seemed to make it any clearer. That comes out as
<INSTANCE CLASSNAME="__ExtendedStatus">
<QUALIFIER NAME="abstract" PROPAGATED="true" TYPE="boolean"
OVERRIDABLE="false" TOINSTANCE="true"><VALUE>TRUE</VALUE></QUALIFIER>
<PROPERTY NAME="__PATH" CLASSORIGIN="___SYSTEM" TYPE="string"></PROPERTY>
<PROPERTY NAME="__NAMESPACE" CLASSORIGIN="___SYSTEM" TYPE="string"></PROPERTY>
<PROPERTY NAME="__SERVER" CLASSORIGIN="___SYSTEM" TYPE="string"></PROPERTY>
<PROPERTY.ARRAY NAME="__DERIVATION" CLASSORIGIN="___SYSTEM" TYPE="string">
<VALUE.ARRAY><VALUE>__NotifyStatus</VALUE></VALUE.ARRAY>
</PROPERTY.ARRAY>
<PROPERTY NAME="__PROPERTY_COUNT" CLASSORIGIN="___SYSTEM"
TYPE="sint32"><VALUE>5</VALUE></PROPERTY>
<PROPERTY NAME="__RELPATH" CLASSORIGIN="___SYSTEM" TYPE="string"></PROPERTY>
<PROPERTY NAME="__DYNASTY" CLASSORIGIN="___SYSTEM"
TYPE="string"><VALUE>__NotifyStatus</VALUE></PROPERTY>
<PROPERTY NAME="__SUPERCLASS" CLASSORIGIN="___SYSTEM"
TYPE="string"><VALUE>__NotifyStatus</VALUE></PROPERTY>
<PROPERTY NAME="__CLASS" CLASSORIGIN="___SYSTEM"
TYPE="string"><VALUE>__ExtendedStatus</VALUE></PROPERTY>
<PROPERTY NAME="__GENUS" CLASSORIGIN="___SYSTEM"
TYPE="sint32"><VALUE>2</VALUE></PROPERTY>
<PROPERTY NAME="Description" CLASSORIGIN="__ExtendedStatus"
PROPAGATED="true" TYPE="string">
<QUALIFIER NAME="CIMTYPE" PROPAGATED="true" TYPE="string"
TOINSTANCE="true"><VALUE>string</VALUE></QUALIFIER>
</PROPERTY>
<PROPERTY NAME="Operation" CLASSORIGIN="__ExtendedStatus" TYPE="string">
<QUALIFIER NAME="CIMTYPE" PROPAGATED="true" TYPE="string"
TOINSTANCE="true"><VALUE>string</VALUE></QUALIFIER>
<VALUE>ExecQuery</VALUE>
</PROPERTY>
<PROPERTY NAME="ParameterInfo" CLASSORIGIN="__ExtendedStatus" TYPE="string">
<QUALIFIER NAME="CIMTYPE" PROPAGATED="true" TYPE="string"
TOINSTANCE="true"><VALUE>string</VALUE></QUALIFIER>
<VALUE>select * from Win32_Product</VALUE>
</PROPERTY>
<PROPERTY NAME="ProviderName" CLASSORIGIN="__ExtendedStatus" TYPE="string">
<QUALIFIER NAME="CIMTYPE" PROPAGATED="true" TYPE="string"
TOINSTANCE="true"><VALUE>string</VALUE></QUALIFIER>
<VALUE>WinMgmt</VALUE>
</PROPERTY>
<PROPERTY NAME="StatusCode" CLASSORIGIN="__NotifyStatus" PROPAGATED="true"
TYPE="uint32">
<QUALIFIER NAME="CIMTYPE" PROPAGATED="true" TYPE="string"
TOINSTANCE="true"><VALUE>uint32</VALUE></QUALIFIER>
</PROPERTY>
</INSTANCE>

Any pointers on how to determine the cause and make it go away?

Thanks
Mark
Dec 18 '07 #1
4 2640
Hi Mark,

What do you mean in details of code "blows up"? Do you get any exception or
crash with the code? If so, can you provide the exception details and call
stack for analysis?

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 19 '07 #2
Hi Jeffrey...

The exception data provided is all I've got. The code is throwing an
exception in the MoveNext() iterator of the code snippet provided. The
exception is a ManagementException (ThrowWithExtendedInfo). There are no
nested exceptions, and the ManagementException ErrorInfo is in the original
post. Unfortunately, I didn't see anything particularly helpful in that
either.

Thanks
Mark
""Jeffrey Tan[MSFT]"" wrote:
Hi Mark,

What do you mean in details of code "blows up"? Do you get any exception or
crash with the code? If so, can you provide the exception details and call
stack for analysis?

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 19 '07 #3
Hi Mark,

Sorry but where do you get this information? Do you get it under VS2005
debugger or without debugging? Why did you get it as XML format type?

I have never seen this xml format exception info before, and it is hard to
read from it.

Also, is it possible to obtain the stack trace of this exception? It is
better if you can break in the first chance notification of
ManagementException and get the stack trace.

Finally, can you provide a little sample project to help me reproduce this
problem locally? Without reproducing the problem, it is hard to guess the
root cause.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Dec 20 '07 #4
Hi Mark,

Thanks for your feedback.

Without reproducing this problem, it is hard to analysis it. Since this is
a WMI issue, microsoft.public.win32.programmer.wmi is dedicated for this
topic. But, I am the support engineer of that newsgroup and I would not
expect you will get much help there with the current information.

Regarding the current situation, I would recommend you to contact Microsoft
CSS for a case support; the case support engineer may help you to perform
some remote debugging on your problematic machine.

You can contact Microsoft CSS at 1-(800)936-5800 or by choosing one of the
options listed at:
http://www.microsoft.com/services/mi...v_support.mspx

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Dec 21 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: will | last post by:
why doesnt this work? Im basically trying to get the value of the root node attribute the 'Result' attr. Which can be one of 3 things. OK, ERROR or INVALID, and then choosing between the 3 and...
4
by: cplusplus | last post by:
Hello, I have newbie question. I'm stuck on this current assignment. Write a program that prompts the user for two integer values, passes the values to a function where they are multiplied...
2
by: Pablo Garcia | last post by:
I am working with Windows Management Instrumentation (WMI). I must use the namespace ROOT.CIMV2, I have written "using ROOT.CIMV2.Win32" on the top of the file, but a compilation error happened...
1
by: Pablo Garcia | last post by:
Please, if someone knows which reference I must Add to use the namespace ROOT.CIMV2, please tell me. Thank you
4
by: SnakeS | last post by:
When I do: using ROOT.CIMV2.Win32; the class there isn't. This namespace or class I didn't find it. How i using this classes?
2
by: Rich | last post by:
Greetings, I am trying to find a way to use a form of GetObject in VB.Net and have been researching WMI. Apparently, this is a vast subject, but seems to reference a Namespace called...
9
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its...
6
by: active | last post by:
This works with Strict Off But not with Strict On Sometimes I can figure out what is needed by running it and using QuickWatch to see the type required but GetObject("winmgmts:\\" &...
1
by: tomujtaba | last post by:
Hi, I am trying to read some IIS information from Windows 2003 Server. Earlier I was using "root\cimv2" for Hard disk information of the server and its working. Now I want to read IIS related...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.