473,405 Members | 2,379 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,405 software developers and data experts.

Changing TCP/IP settings

I am trying to figure out how to change TCP/IP settings through VC# (IP
Address, DNS, WINS, Gateway, Computer Name, Host, etc), but cannot find
anything anywhere. I'm sure that it's out there, but I am not finding it.
Does anyone have some info as to where I may find this, or any code or ideas
that may be of help? I've searched the documentation that came with VC#,
but cannot find anything. (I'm sure it's there, but I haven't been able to
find it.) I also have several books, but they tell you how to create a
connection, but not how to change the settings.

Rob

Thank you for any help in advance.
Jul 21 '05 #1
1 6285
"Robert" <rg*****@si.rr.com> wrote in message news:<ka*****************@twister.nyc.rr.com>...
I am trying to figure out how to change TCP/IP settings through VC# (IP
Address, DNS, WINS, Gateway, Computer Name, Host, etc), but cannot find
anything anywhere. I'm sure that it's out there, but I am not finding it.
Does anyone have some info as to where I may find this, or any code or ideas
that may be of help? I've searched the documentation that came with VC#,
but cannot find anything. (I'm sure it's there, but I haven't been able to
find it.) I also have several books, but they tell you how to create a
connection, but not how to change the settings.

Rob -

All of this information can be found in the Registry. You can use
the classes in the Microsoft.Win32.Registry and
Microsoft.Win32.RegistryKey namespaces to query and modify these
values.

On Windows NT, 2000, and XP machines the IP settings are stored
under each individual network interface card. You can obtain a listing
of the installed network cards from the
HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards
Registry key. Once you have a list of the installed network cards, you
can see their individual IP settings under the
HKLM\SYSTEM\CurrentControlSet\Services key, listed under the same key
name of the network card.

In Chapter 2 of my C# book I demonstrate using the Registry to
obtain IP address information. You can freely download the example
code from the Sybex web site. It should not be too difficult to change
the code to modify the IP settings. Hope this helps get you started on
your journey. Good luck with your project.

Rich Blum - Author
"C# Network Programming" (Sybex)
http://www.sybex.com/sybexbooks.nsf/Booklist/4176
"Network Performance Open Source Toolkit" (Wiley)
http://www.wiley.com/WileyCDA/WileyT...471433012.html
Jul 21 '05 #2

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

Similar topics

2
by: news | last post by:
I want to see my settings for java. How do I see the settings using set on DOS screen?? My problem is when I type in set and nothing shows. I go to the directly where java.exe is located and...
0
by: Anthony Nystrom | last post by:
I am having trouble with changing printer settings before I raise either the pagesetup dialog or the print preview dialog... Changing the printer name is easy, but I am also trying to change the...
4
by: Doug van Vianen | last post by:
Hi, I have the following coding on a web page. It causes two pictures (pic1.jpg and pic2.jpg) to show, one above the other and then when one clicks on the top picture is squeezes to the left...
2
by: ExitusLSU | last post by:
Is there a way to change the DEFAULT printer settings for an installed printer? I want it to change the printer settings for a specified printer at the whole OS/Windows level, not just for the...
10
by: steve | last post by:
Hi All I would like to be able to change the cell borders on certain cells to none at runtime to make a group of cells appear to be merged I have tried the following in the cellformatting...
4
by: Jamie McQuay | last post by:
Does any one know if it is possible to set the location of a settings file? I want to use separate settings files for each user and will need to change the location. Thanks, Jamie
2
by: Robert Dufour | last post by:
Its easyb to change user leve settings but how do you change application level settings in code. Apparently it seems it can't be done. Duhhh. Anybody manage a workaround? Thanks for any help....
0
by: rawatgaurav81 | last post by:
I had this strange problem in handling XMLDocuments in asp.net.Though the problem occurs while working on the main application.I will try to explain it with shorter code. I had a form with 2...
0
by: Jonathan Wood | last post by:
I had the strangest thing happen yesterday. I was playing with the EnableViewState property for some table controls, ran my Web project to the page I was working on, clicked a button that...
3
by: senthilkumarb | last post by:
Dynamically changing browser settings Browser have various settings like - cookies, cache, etc... How to check a browser whether cookies is Enabled OR Disabled in the client machine using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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,...

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.