473,467 Members | 1,487 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

WMI: I can't find the reference to namespace root/cimv2

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 because I hadn't Add the
Reference where that namespace is.
If someone knows which is the Reference I must Add to the project, tell me,
please.
Thank you very much.
Nov 15 '05 #1
2 2795
The using part isn't strictly necessary, it's there for ease of use.

In visual studio, right-click on References in Solution Explorer and
choose Add Reference...
Locate the assembly (dll) and add it.

With csc I think you use /reference: WMI.dll or whatever the assembly is
called.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #2
WMI namespaces are not .NET FCL namespaces, use the System.Management namespace to include WMI support in your code.
Check the MSDN docs for deatils and samples.

Willy.

"Pablo Garcia" <10*******@alumnos.uc3m.es> wrote in message news:OD**************@TK2MSFTNGP09.phx.gbl...
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 because I hadn't Add the
Reference where that namespace is.
If someone knows which is the Reference I must Add to the project, tell me,
please.
Thank you very much.

Nov 15 '05 #3

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

Similar topics

11
by: nico | last post by:
Hello I have write this program that retrieve all directory and subdirectory recursively of a given directory given in parameter. For each directory, the script find all user permission for the...
7
by: jimdscudder | last post by:
How can I use WMI or a WqlObjectQuery to find the hard drive letter of the physical drive location index. For example the following code will give me the physical drive location:...
11
by: ricolee99 | last post by:
Hi everyone, I'm trying to invoke my .exe application from a remote server. Here is the code: ManagementClass processClass = new ManagementClass ("\\\\" +"RemoteServerName" +...
0
by: Ewart MacLucas | last post by:
generated some WMI managed classes using the downloadable extensions for vs2003 from mircrosoft downloads; wrote some test code to enumerate the physicall processors and it works a treat, but a...
9
by: Adrian Dev | last post by:
Hi, I have succesfully used a ManagementScope object to get WMI information about workstations on the current domain using "//xp10/root/cimv1". But if I make a request to a workstation on a...
4
by: Jason | last post by:
Hello I'm writting a c# app, and I've got a computer that has two built in nic's. One is a Intel Pro/100 and the other is a Intel Pro/1000. I want to get the mac and ip address assigned to...
4
by: shane | last post by:
I am trying to get values from a WMI Query in my textbox, txtResults I don't think I am understand what I need to do to move the value from the for each statement in the quary into the textbox, as...
1
by: =?Utf-8?B?Sm9obkJhdGVz?= | last post by:
Problem: I need to backup and clear the security event log. I have this working via a vbsscript which I will post below. However while I can use this script manually it is not user friendly and...
3
by: =?Utf-8?B?Sm9obkJhdGVz?= | last post by:
I'm trying to (programatically) backup and clear the security event log on the local machine. I can do this manually through the event viewer and I am logged on as an administrator. I can...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.