Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 4th, 2006, 02:08 AM
Registered User
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.Management

I am getting a Generic Failure when i try to access the values in ManagementObjectCollection . The following code is working well in win 2k3 box but the same code if i try to execute in win xp sp2 macine its throwing the error . can anybody suggest a solution for this.

ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_Product");
            ManagementObjectSearcher query = new ManagementObjectSearcher((ManagementScope)Connect. alManagementScope[0], oq);
            ManagementObjectCollection queryColl = query.Get();

            Button btnUnInstall = new Button();
            cboPack.Text = "";
            ListBox lstPack = new ListBox();
            foreach (ManagementObject mo in queryColl)
                cboPack.Items.Add(mo["Name"].ToString() + " " + mo["Version"].ToString());


Old May 5th, 2006, 05:26 AM
Registered User
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I had also go this error but that error come to me on windows server 2003. i had worked on it approx 9-10 months ago not remember exactly but as far as my mind says the problem is solved by performing these steps "Go to control panel -> Add or Remove Programs -> Add or Remove windows components -> check Management and Monitoring Tools. It should be checked and installed." May be helpful to you.

Similar Threads
Thread Thread Starter Forum Replies Last Post
content management system Adam H-W Classic ASP Basics 13 November 13th, 2006 02:54 PM
FAQ Management System lutherium Pro JSP 0 October 24th, 2006 02:03 PM
Content management system wambozi Pro PHP 1 September 23rd, 2006 04:19 PM
Directory Management System aarunlal ASP.NET 2.0 Professional 1 March 3rd, 2006 03:55 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.