473,553 Members | 3,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Manageme nt

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 the
System.Manageme nt namespace. This is where my problem is, I have no
System.Manageme nt namespace. Could anyone help me locate it or a
reference to locate it?

Jan 4 '06 #1
7 6698
If you have .Net 2.0 then it is in
c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.

"eric" wrote:
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 the
System.Manageme nt namespace. This is where my problem is, I have no
System.Manageme nt namespace. Could anyone help me locate it or a
reference to locate it?

Jan 4 '06 #2
Actually I think that should be:

C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Terry" wrote:
If you have .Net 2.0 then it is in
c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.

"eric" wrote:
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 the
System.Manageme nt namespace. This is where my problem is, I have no
System.Manageme nt namespace. Could anyone help me locate it or a
reference to locate it?

Jan 5 '06 #3
hi i've the same problem
when i type
using System.Manageme nt;
and compile the VS gives me an error indicating that there is no namespace
named System.Manageme nt
i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
1.1 and 2.0
i was trying to make a windows based application using this namespace to
fingerprint machines to protect my software from piracy
here is a link fot that code
http://www.vbforums.com/showthread.php?t=250436&page=1
the funny thing that System.Manageme nt is documented on VS 2003 but still
the VS 2003 IDE doesn't recognize it as a valid namespace
it's also documented here
http://msdn.microsoft.com/library/de...management.asp
please help i really need a fast answer for this problem
thanx in advance
"Peter Bromberg [C# MVP]" wrote:
Actually I think that should be:

C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Terry" wrote:
If you have .Net 2.0 then it is in
c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.

"eric" wrote:
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 the
System.Manageme nt namespace. This is where my problem is, I have no
System.Manageme nt namespace. Could anyone help me locate it or a
reference to locate it?

Jan 13 '06 #4
one more thing
i've reinstalled the framework and tried that on 2 machine with both VS 2003
and VS 2005 and still the problem is the same
"Fady Anwar" wrote:
hi i've the same problem
when i type
using System.Manageme nt;
and compile the VS gives me an error indicating that there is no namespace
named System.Manageme nt
i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
1.1 and 2.0
i was trying to make a windows based application using this namespace to
fingerprint machines to protect my software from piracy
here is a link fot that code
http://www.vbforums.com/showthread.php?t=250436&page=1
the funny thing that System.Manageme nt is documented on VS 2003 but still
the VS 2003 IDE doesn't recognize it as a valid namespace
it's also documented here
http://msdn.microsoft.com/library/de...management.asp
please help i really need a fast answer for this problem
thanx in advance
"Peter Bromberg [C# MVP]" wrote:
Actually I think that should be:

C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Terry" wrote:
If you have .Net 2.0 then it is in
c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.

"eric" wrote:

> 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 the
> System.Manageme nt namespace. This is where my problem is, I have no
> System.Manageme nt namespace. Could anyone help me locate it or a
> reference to locate it?
>
>

Jan 13 '06 #5
Fady,
You have to set a hard reference in the project to the actual
System.Managmen t.dll assembly, its not standard in machine.config.

Hope that helps!

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Fady Anwar" wrote:
hi i've the same problem
when i type
using System.Manageme nt;
and compile the VS gives me an error indicating that there is no namespace
named System.Manageme nt
i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
1.1 and 2.0
i was trying to make a windows based application using this namespace to
fingerprint machines to protect my software from piracy
here is a link fot that code
http://www.vbforums.com/showthread.php?t=250436&page=1
the funny thing that System.Manageme nt is documented on VS 2003 but still
the VS 2003 IDE doesn't recognize it as a valid namespace
it's also documented here
http://msdn.microsoft.com/library/de...management.asp
please help i really need a fast answer for this problem
thanx in advance
"Peter Bromberg [C# MVP]" wrote:
Actually I think that should be:

C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Terry" wrote:
If you have .Net 2.0 then it is in
c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.

"eric" wrote:

> 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 the
> System.Manageme nt namespace. This is where my problem is, I have no
> System.Manageme nt namespace. Could anyone help me locate it or a
> reference to locate it?
>
>

Jan 13 '06 #6
really thanx alot now i can see it in the system namespace tree in VS 2003
but i would like to ask a q
y it's not standard?

"Peter Bromberg [C# MVP]" wrote:
Fady,
You have to set a hard reference in the project to the actual
System.Managmen t.dll assembly, its not standard in machine.config.

Hope that helps!

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Fady Anwar" wrote:
hi i've the same problem
when i type
using System.Manageme nt;
and compile the VS gives me an error indicating that there is no namespace
named System.Manageme nt
i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
1.1 and 2.0
i was trying to make a windows based application using this namespace to
fingerprint machines to protect my software from piracy
here is a link fot that code
http://www.vbforums.com/showthread.php?t=250436&page=1
the funny thing that System.Manageme nt is documented on VS 2003 but still
the VS 2003 IDE doesn't recognize it as a valid namespace
it's also documented here
http://msdn.microsoft.com/library/de...management.asp
please help i really need a fast answer for this problem
thanx in advance
"Peter Bromberg [C# MVP]" wrote:
Actually I think that should be:

C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Terry" wrote:

> If you have .Net 2.0 then it is in
> c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
>
> "eric" wrote:
>
> > 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 the
> > System.Manageme nt namespace. This is where my problem is, I have no
> > System.Manageme nt namespace. Could anyone help me locate it or a
> > reference to locate it?
> >
> >

Jan 13 '06 #7
You have to add a reference to everything that's not in mscorlib.dll or
automatically referenced when you create a new project of a certain type (eg
Windows App will reference the dll with System.Windows. Forms).

There are several dlls because it would be inefficient to load and init a
load of stuff that you aren't going to use.

As I recall the documentation now tells you the name of the defining dll for
every class etc.

One reason why there are several dlls is to allow finer control of
versioning.

(Another reason for separate dlls is for separate assemblies because
otherwise the scope of 'internal' would be too large - I'm not a fan of
internal)

"Fady Anwar" <Fa*******@disc ussions.microso ft.com> wrote in message
news:13******** *************** ***********@mic rosoft.com...
really thanx alot now i can see it in the system namespace tree in VS 2003
but i would like to ask a q
y it's not standard?

"Peter Bromberg [C# MVP]" wrote:
Fady,
You have to set a hard reference in the project to the actual
System.Managmen t.dll assembly, its not standard in machine.config.

Hope that helps!

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Fady Anwar" wrote:
> hi i've the same problem
> when i type
> using System.Manageme nt;
> and compile the VS gives me an error indicating that there is no
> namespace
> named System.Manageme nt
> i've tried this both on VS 2003 and VS 2005 using C# using both
> frameworks
> 1.1 and 2.0
> i was trying to make a windows based application using this namespace
> to
> fingerprint machines to protect my software from piracy
> here is a link fot that code
> http://www.vbforums.com/showthread.php?t=250436&page=1
> the funny thing that System.Manageme nt is documented on VS 2003 but
> still
> the VS 2003 IDE doesn't recognize it as a valid namespace
> it's also documented here
> http://msdn.microsoft.com/library/de...management.asp
> please help i really need a fast answer for this problem
> thanx in advance
> "Peter Bromberg [C# MVP]" wrote:
>
> > Actually I think that should be:
> >
> > C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
> >
> >
> > Co-founder, Eggheadcafe.com developer portal:
> > http://www.eggheadcafe.com
> > UnBlog:
> > http://petesbloggerama.blogspot.com
> >
> >
> >
> >
> > "Terry" wrote:
> >
> > > If you have .Net 2.0 then it is in
> > > c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
> > >
> > > "eric" wrote:
> > >
> > > > 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 the
> > > > System.Manageme nt namespace. This is where my problem is, I have
> > > > no
> > > > System.Manageme nt namespace. Could anyone help me locate it or a
> > > > reference to locate it?
> > > >
> > > >

Jan 15 '06 #8

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

Similar topics

2
14011
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 the workstations are DELLs running XP SP1a with the 1.1 .NET Framework. The following line of code generates an exception on the one PC: Dim oMac...
0
1731
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 query As New System.Management.ManagementObjectSearcher("SELECT * From Win32_LogicalDisk") Dim queryCollection As...
1
5907
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 "Management" does not exist in the class or namespace "System" How do I go about accessing the "Management" namespace... I am trying to get the Serial...
0
1212
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. ---> System.Runtime.InteropServices.InvalidC omObjectException: COM object that has been separated from its underlying RCW can not be used. at...
1
10227
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 mo As Management.ManagementObject moSearch = New Management.ManagementObjectSearcher("Select * from Win32_Printer")
3
23298
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 help file, this 'System.Management.ManagementClass' is under System.Object, so I put in the Imports System.Object in namespace, but that seems...
8
5738
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 the same domain i start the collection on the remote machine i can get some 19 services without a problem then it will fail with: ...
3
16145
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; .... My compile fails using csc.exe:
2
4628
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 install it, the codes are copied to the virtual directory under Inetpub. when i try to edit the web.config file it throws an exception access is denied...
0
7772
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7526
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7852
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6109
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5409
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5133
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1990
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 we have to send another system
0
808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.