473,326 Members | 2,133 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,326 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 6624
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:
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.