473,320 Members | 1,865 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,320 software developers and data experts.

System.Management How?

Hi NG,

I am trying to get system information like Windows Registration Number /
Mac-Address.
Asking Mr. Googles I found out, that WMI is what I need.

In the MSDN Library I found (might not be translated correctly from german
to english) :
"How to : prepare the IDE for use of WMI .NET"

There it sais to reference the "System.DirctoryServices.dll" and then to use
the "System.Management" name space.
I have done so, but on compiling I get the error message, that this name
space is not available.

What is it I am doing wrong?

Thanks for hints and Help.
Rainer Queck
Jul 7 '06 #1
3 1719
Make a reference to System.Management.dll

Rainer Queck schrieb:
Hi NG,

I am trying to get system information like Windows Registration Number /
Mac-Address.
Asking Mr. Googles I found out, that WMI is what I need.

In the MSDN Library I found (might not be translated correctly from german
to english) :
"How to : prepare the IDE for use of WMI .NET"

There it sais to reference the "System.DirctoryServices.dll" and then to use
the "System.Management" name space.
I have done so, but on compiling I get the error message, that this name
space is not available.

What is it I am doing wrong?

Thanks for hints and Help.
Rainer Queck

Jul 7 '06 #2
System.DirectoryServices.dll responsible for the ActiveDirectory, not the WMI
Add reference to the System.Management.dll
Hi NG,

I am trying to get system information like Windows Registration Number /
Mac-Address.
Asking Mr. Googles I found out, that WMI is what I need.

In the MSDN Library I found (might not be translated correctly from german
to english) :
"How to : prepare the IDE for use of WMI .NET"

There it sais to reference the "System.DirctoryServices.dll" and then to use
the "System.Management" name space.
I have done so, but on compiling I get the error message, that this name
space is not available.

What is it I am doing wrong?

Thanks for hints and Help.
Rainer Queck
>

Jul 7 '06 #3
Hello Joachim, hello Michael,

thanks for this hint. That solved my problem.

Too bad that the MSDN Library leads into the wrong direction.

Rainer
Jul 7 '06 #4

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

Similar topics

2
by: Paul Gronka | last post by:
I've got a VB.NET windows application (written in VS .NET 2003) that makes a call to WMI for retrieving the MAC Address from the client's PC. It works on 4 out of the 5 PC's tested so far. All...
0
by: Ben Reese | last post by:
Kind people on this discussion group have previously helped me to dynamically identify CD rom drives etc at runtime using objects in System.management +++++++++++++++++++++++++++++++++++++++ Dim...
1
by: PaulThomas | last post by:
I am using VS.Net 2000 and C# trying to access the System.Management namespace in a Web Application -but- after: using System; using System.Management; I get: The type or namespace name...
0
by: Masood Siddiqi [MSFT] | last post by:
Hi, I am getting this exception Unhandled Exception: System.Management.ManagementException: COM object that has been separated from its underlying RCW can not be used. --->...
1
by: lcifers | last post by:
I have an application that uses the following code to return the default printer: Dim moReturn As Management.ManagementObjectCollection Dim moSearch As Management.ManagementObjectSearcher Dim...
7
by: eric | last post by:
I'm writing a program in C# and found a couple of threads about how to check the status of a printer before sending it any data, to ensure that the printer is ready to print. They say to include...
3
by: Anil Gupte | last post by:
I am getting this error: Type 'System.Management.ManagementClass' is not defined. The statement is: Dim diskClass As New System.Management.ManagementClass("Win32_LogicalDisk") According to the...
8
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i trying to collect windows services. i'm getting inconsistencies. the collection works every time locally. but remote collection yields different result depending on my lab environment. 1) in...
3
by: Marco Shaw | last post by:
I've got some C# code to create a custom PowerShell cmdlet with these statements: .... using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; .... ...
2
by: karthi84 | last post by:
Hi Experts, i have created a web application which has an option to edit the web config file from the web page. when i create an installer for this project using web setup project in VS2008 and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.