Change IP address and HostName of NT machine

Environment: NT4 SP5

How to set local machine IP addresses from your program ?

Follow this steps

1. Open registry on the HKEY_LOCAL_MACHINE

2. Find the subKey = SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\netcard# netcard# usually is "1" but you can control any subkey and find specific netwrok Adapters Refer to "MSDN Registry Entries for Network Adapter Cards"

3. Get data for the value "ServiceName"

4. Find the subKey = SYSTEM\CurrentControlSet\Services\"ServiceName"\Parameters\TcpIp"

5. Set data for the value "IpAddress" to change IP address

6. Set data for the value "SubnetMask" to change subnet mask

7. Set data for the value "DefaultGateway" to change default gateway

8. Reboot your PC.

How to set local machine HostName from your program ?

Follow this steps:

1. Open registry on the HKEY_LOCAL_MACHINE

2. Find the subKey = SYSTEM\CurrentControlSet\Services\TcpIp\Parameters

3. Set data for the value "HostName"

4. Find the subKey = SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName

5. Set data for the value "ComputerName"

6. Reboot your PC and HostName will be set.


WARNING: Modify registry incorrect can cause serious, system-wide problems . Use this at your own risk



Comments

  • Inspection, uncorrupted a baulk up on

    Posted by Dyncintognoxy on 01/20/2013 07:13pm

    We [url=http://www.nodepositbonus.gd]casinos online[/url] be suffering with a rotund library of utterly freed casino games for you to sport sensibly here in your browser. Whether you pine for to unaccustomed a mesa game plan or scarcely try manifest a occasional modern slots first playing in the direction of real money, we procure you covered. These are the claim verbatim at the same time games that you can with at veritable online casinos and you can with them all for free.

    Reply
  • Coupling, incorruptible a rest up on

    Posted by Dyncintognoxy on 01/20/2013 06:07am

    We [url=http://www.casino-online.gd]blackjack[/url] be suffering with a rotund library of unqualifiedly freed casino games for you to monkey tricks right here in your browser. Whether you call for to unaccustomed a provisions game strategy or honest try out a few modern slots once playing in the direction of unfeigned money, we possess you covered. These are the claim verbatim at the same time games that you can play at earnest online casinos and you can with them all quest of free.

    Reply
  • i need a help to capture the packets

    Posted by josephashvin on 03/28/2006 11:24pm

    i need the code for capture the packetfrom the network.the code in java.any one know the send it. thank you.

    Reply
  • Re: Win2000 ...

    Posted by Legacy on 11/07/2001 12:00am

    Originally posted by: fbi

    Hi,
    there is an example in MS Platform SDK named "ipchange".
    Maybe this give you a hint.

    CU

    Reply
  • Win2000, How to .. without Reboot?

    Posted by Legacy on 04/16/2001 12:00am

    Originally posted by: cloudree


    Windows 2000, the ip could be changed in Control Panel without reboot.

    but, I find that only changing the registry can't change the IP.

    Is there any other stuff?

    Reply
  • Can I use this under Win95?

    Posted by Legacy on 08/20/1999 12:00am

    Originally posted by: Anonymus

    Can I use this under W95? Or is this only for NT?

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds