Change IP address and HostName of NT machine

WEBINAR: On-demand webcast

How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >

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

History



Comments

  • Changing assigned IP address

    Posted by Chrispcritters on 05/17/2005 04:26pm

    For instructions on changing a dynamically assigned IP address visit: http://beta.whatismyipaddress.com/staticpages/index.php/changeip

    Reply
  • Question - for Win 2000

    Posted by nealhauser on 03/22/2004 10:12am

    Will changing the registry as per the instructions detailed in this article work on a computer running win 2K? Does one have to reboot the computer to cause the changes to be accepted and used?

    Reply
  • java coding to change ip address automatically to log on different network without restarting.

    Posted by Legacy on 02/25/2004 12:00am

    Originally posted by: rajee

    i am in india.
    my project is
    "plugin utility for ip configuration".i am doing this project for railways
    my doubts are:
    1> in an intranet consisting of 3 or 4 networks.
    i need my system to have list of ip address.as i choose one(ip address) i should automatically login
    to retrive data in requested system without reboting or restarting.
    plz help me.
    i need java coding for it.so plz send me if u know it as soon as possible.
    i will be very thankfull if u help me as soon as possible.

    • RE: JimN

      Posted by mikewang on 05/27/2004 11:13pm

      I am in china. Could you give me some advice of it ? I need c/c++ coding for it. plz send me details to mikewang@tgegroup.com, or post it here. thanks for your help.

      Reply
    • RE: change ip address in an intranet without reboot

      Posted by JimN on 05/27/2004 07:20pm

      I know its been over a year since you posted this question and I'm not sure if replies are simply posted on the web site or actually emailed to the poster, but I'd like to know if you ever figured out how to accomplish what you were trying to do here. If so, please contact me. Thanks

      Reply
    Reply
  • Using remote system for changing the date and time in win9X

    Posted by Legacy on 01/06/2004 12:00am

    Originally posted by: somu

    Can u please help me changing the date and time of the other systems in network, sitting right on one of the client. We use win2000 for networking and all other clients are win98se.
    

    Reply
  • How to Change Win9x IP Address through Registry

    Posted by Legacy on 11/27/2003 12:00am

    Originally posted by: Shekhar

    can any 1 help me how to change IP address of win 95 and win 98 machine through registry ..??? i already gone throuh the this link http://codeguru.earthweb.com/network/change_ip.shtml , but here they gave abt win xp,2000 and NT machine so pls give the examples mail me at shekharkoli@rediffmail.com
    hope won't disappoint me..
    thanks in advance

    regards
    -shekhar

    Reply
  • example

    Posted by Legacy on 04/22/2003 12:00am

    Originally posted by: David

    i need a exampple in vb to change ip, send to ticosapiens@yahoo.com

    Reply
  • How to change IP address of remote machine

    Posted by Legacy on 03/21/2003 12:00am

    Originally posted by: vijay

    Is there any way to change the IP address of remote machine thru code?

    Reply
  • Is there really no standard API-call to CHANGE a local IP-adress

    Posted by Legacy on 02/14/2003 12:00am

    Originally posted by: Eboer

    There must be an API-call that can perform this feat.
    This thread should end with a proper programming solution
    so that a normal wrapper can be written witch supports
    NT as well as W2K.
    I'll keep searching elsewhere, and report back when it's
    found.

    I'm currently working on a program that:
    (WITH OR WITHOUT REBOOTING)
    - changes the Domain, Workgroup
    - as well as changes the local IP-adress
    - optionally changes the last logged in user
    as well as the last logged in Domain
    - changes any Internet Explorer setting needed
    for browsing.

    Purpose:
    For a developer that frequently has to connect
    to other systems.
    For a quick way of interchanging settings to complete
    this task, so that any developer can share his settings
    with colleagues.

    • RE: Is there really no standard API-call to CHANGE a local IP-adress

      Posted by JimN on 05/27/2004 07:16pm

      I know its been over a year since you posted this question and I'm not sure if replies are simply posted on the web site or actually emailed to the poster, but I'd like to know if you ever figured out how to accomplish what you were trying to do here. If so, please contact me. Thanks

      Reply
    Reply
  • WAKE UP PEOPLE

    Posted by Legacy on 02/10/2003 12:00am

    Originally posted by: Me Me

    If you dont know what your doing....dont do it. You can do more harm than good so.....DONT DO IT. If you dont konw what a registry key is, i suggest you buy a new computer to change you IP address. That would be the simplest and smartest thing for you to do.

    Reply
  • Is there any way to change Ip address in win98 without restart

    Posted by Legacy on 01/28/2003 12:00am

    Originally posted by: rain

    Is there any way to change Ip address in win98 without restart?

    Reply
  • Loading, Please Wait ...

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

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date