471,319 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

Getting and Setting the network settings.

UJ
I had already asked how to get the network settings on the machine and was
told that I should use the WMI interface. I downloaded programs that will
allow me to look at the stuff but I'm not sure which items are the correct
ones to get.

Can anybody give me a direction on where I look to figure out how to get/set
the IP address, gateway, DNS Server and Proxy Server? When I look in one of
the dump programs there is lots of stuff about network adapters but I can't
figure out which is the one I want.

TIA - Jeff.
Jan 18 '06 #1
5 3729
Jeff,

You can use the Win32_NetworkAdapterConfiguration class. The properties
you want are:

IPAddress
DNSServerSearchOrder
DefaultIPGateway

The proxy is a different story, that you would get from the program
itself that is using the proxy. This program might or might not have a WMI
interface. Or do you mean another type of proxy that is system wide?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I had already asked how to get the network settings on the machine and was
told that I should use the WMI interface. I downloaded programs that will
allow me to look at the stuff but I'm not sure which items are the correct
ones to get.

Can anybody give me a direction on where I look to figure out how to
get/set the IP address, gateway, DNS Server and Proxy Server? When I look
in one of the dump programs there is lots of stuff about network adapters
but I can't figure out which is the one I want.

TIA - Jeff.

Jan 18 '06 #2
UJ
Nicholas,
I guess I'm not sure what I mean. My network engineer wants to be able to
change the proxy server through our interface.

Is that enough information or do I need his input?

TIA - Jeff.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uy**************@TK2MSFTNGP10.phx.gbl...
Jeff,

You can use the Win32_NetworkAdapterConfiguration class. The
properties you want are:

IPAddress
DNSServerSearchOrder
DefaultIPGateway

The proxy is a different story, that you would get from the program
itself that is using the proxy. This program might or might not have a
WMI interface. Or do you mean another type of proxy that is system wide?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I had already asked how to get the network settings on the machine and was
told that I should use the WMI interface. I downloaded programs that will
allow me to look at the stuff but I'm not sure which items are the correct
ones to get.

Can anybody give me a direction on where I look to figure out how to
get/set the IP address, gateway, DNS Server and Proxy Server? When I look
in one of the dump programs there is lots of stuff about network adapters
but I can't figure out which is the one I want.

TIA - Jeff.


Jan 18 '06 #3
UJ
Nicholas,
All the documentation I've seen talks about using either VBScript or CScript
to use this object. Can it be used in a C# program?

If not - how do I get/set the info?

TIA - Jeff.

"UJ" <fr**@nowhere.com> wrote in message
news:e4**************@TK2MSFTNGP11.phx.gbl...
Nicholas,
I guess I'm not sure what I mean. My network engineer wants to be able to
change the proxy server through our interface.

Is that enough information or do I need his input?

TIA - Jeff.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uy**************@TK2MSFTNGP10.phx.gbl...
Jeff,

You can use the Win32_NetworkAdapterConfiguration class. The
properties you want are:

IPAddress
DNSServerSearchOrder
DefaultIPGateway

The proxy is a different story, that you would get from the program
itself that is using the proxy. This program might or might not have a
WMI interface. Or do you mean another type of proxy that is system wide?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I had already asked how to get the network settings on the machine and
was told that I should use the WMI interface. I downloaded programs that
will allow me to look at the stuff but I'm not sure which items are the
correct ones to get.

Can anybody give me a direction on where I look to figure out how to
get/set the IP address, gateway, DNS Server and Proxy Server? When I
look in one of the dump programs there is lots of stuff about network
adapters but I can't figure out which is the one I want.

TIA - Jeff.



Jan 18 '06 #4
A proxy server can mean anything. Is it a proxy for external
connections? Is it ISA server? Some more information is needed.

For example, you can set the proxy server for http requests in Internet
Explorer, but this is just IE, it's not for the whole system.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.com> wrote in message
news:e4**************@TK2MSFTNGP11.phx.gbl...
Nicholas,
I guess I'm not sure what I mean. My network engineer wants to be able to
change the proxy server through our interface.

Is that enough information or do I need his input?

TIA - Jeff.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uy**************@TK2MSFTNGP10.phx.gbl...
Jeff,

You can use the Win32_NetworkAdapterConfiguration class. The
properties you want are:

IPAddress
DNSServerSearchOrder
DefaultIPGateway

The proxy is a different story, that you would get from the program
itself that is using the proxy. This program might or might not have a
WMI interface. Or do you mean another type of proxy that is system wide?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I had already asked how to get the network settings on the machine and
was told that I should use the WMI interface. I downloaded programs that
will allow me to look at the stuff but I'm not sure which items are the
correct ones to get.

Can anybody give me a direction on where I look to figure out how to
get/set the IP address, gateway, DNS Server and Proxy Server? When I
look in one of the dump programs there is lots of stuff about network
adapters but I can't figure out which is the one I want.

TIA - Jeff.



Jan 18 '06 #5
Jeff,

Yes, you will want to use the classes in the System.Management namespace
in order to access the WMI classes.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.com> wrote in message
news:uw**************@TK2MSFTNGP15.phx.gbl...
Nicholas,
All the documentation I've seen talks about using either VBScript or
CScript to use this object. Can it be used in a C# program?

If not - how do I get/set the info?

TIA - Jeff.

"UJ" <fr**@nowhere.com> wrote in message
news:e4**************@TK2MSFTNGP11.phx.gbl...
Nicholas,
I guess I'm not sure what I mean. My network engineer wants to be able to
change the proxy server through our interface.

Is that enough information or do I need his input?

TIA - Jeff.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uy**************@TK2MSFTNGP10.phx.gbl...
Jeff,

You can use the Win32_NetworkAdapterConfiguration class. The
properties you want are:

IPAddress
DNSServerSearchOrder
DefaultIPGateway

The proxy is a different story, that you would get from the program
itself that is using the proxy. This program might or might not have a
WMI interface. Or do you mean another type of proxy that is system
wide?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I had already asked how to get the network settings on the machine and
was told that I should use the WMI interface. I downloaded programs that
will allow me to look at the stuff but I'm not sure which items are the
correct ones to get.

Can anybody give me a direction on where I look to figure out how to
get/set the IP address, gateway, DNS Server and Proxy Server? When I
look in one of the dump programs there is lots of stuff about network
adapters but I can't figure out which is the one I want.

TIA - Jeff.



Jan 18 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

303 posts views Thread by mike420 | last post: by
4 posts views Thread by Umesh | last post: by
3 posts views Thread by CSN | last post: by
5 posts views Thread by Doug Handler | last post: by
4 posts views Thread by Odd Bjørn Andersen | last post: by
reply views Thread by rosydwin | last post: by

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.