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

System.Management

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

Jan 4 '06 #1
7 6638
If you have .Net 2.0 then it is in
c:\windows\Microsoft.Net\v2.0\SystemManagement.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.Management namespace. This is where my problem is, I have no
System.Management 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\Microsoft.NET\Framework\<version>\Syste m.Management.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\Microsoft.Net\v2.0\SystemManagement.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.Management namespace. This is where my problem is, I have no
System.Management 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.Management;
and compile the VS gives me an error indicating that there is no namespace
named System.Management
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.Management 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\Microsoft.NET\Framework\<version>\Syste m.Management.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\Microsoft.Net\v2.0\SystemManagement.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.Management namespace. This is where my problem is, I have no
System.Management 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.Management;
and compile the VS gives me an error indicating that there is no namespace
named System.Management
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.Management 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\Microsoft.NET\Framework\<version>\Syste m.Management.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\Microsoft.Net\v2.0\SystemManagement.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.Management namespace. This is where my problem is, I have no
> System.Management 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.Managment.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.Management;
and compile the VS gives me an error indicating that there is no namespace
named System.Management
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.Management 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\Microsoft.NET\Framework\<version>\Syste m.Management.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\Microsoft.Net\v2.0\SystemManagement.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.Management namespace. This is where my problem is, I have no
> System.Management 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.Managment.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.Management;
and compile the VS gives me an error indicating that there is no namespace
named System.Management
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.Management 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\Microsoft.NET\Framework\<version>\Syste m.Management.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\Microsoft.Net\v2.0\SystemManagement.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.Management namespace. This is where my problem is, I have no
> > System.Management 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*******@discussions.microsoft.com> wrote in message
news:13**********************************@microsof t.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.Managment.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.Management;
> and compile the VS gives me an error indicating that there is no
> namespace
> named System.Management
> 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.Management 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\Microsoft.NET\Framework\<version>\Syste m.Management.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\Microsoft.Net\v2.0\SystemManagement.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.Management namespace. This is where my problem is, I have
> > > > no
> > > > System.Management 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
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...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...
0
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...

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.