Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know how to create a .reg registry script that will add a second IP address to a machine that is called ?

Here is the "manual" method:

  1. Go to the Control Panel > Network
    Connections Right click on the Local Area Connection (or whichever network connection you want to add the 2nd IP Address) and click Properties
  2. Click on Internet Protocol (TCP/IP) in the
    connection box and click properties Enter the first IP address in the
    properties box
  3. Click Advanced
  4. Click Add under the IP Addresses box and enter the information for the 2nd IP Address
  5. Close all the boxes
share|improve this question
up vote 12 down vote accepted

You're not going to want to do this with direct manipulation of the registry. You're much better off using the netsh command to make these kinds of changes.

Assuming the NIC is named "Local Area Connection", you can do netsh interface ip "Local Area Connection" x.x.x.x y.y.y.y where x.x.x.x is the IP address and y.y.y.y is the subnet mask.

share|improve this answer
+1 Wish I could agree more... – squillman Jan 20 '10 at 23:26
ahh... i should have thought of that! thanks. ;-) – djangofan Jan 21 '10 at 17:59

Late, I know, but I think djangofan want something like that :

    netsh interface ip set address "Local Area Connection" static

    netsh interface ipv4 add address "Local Area Connection"

and the result :

Carte Ethernet Connexion au réseau local :

   Suffixe DNS propre à la connexion. . . :
   Adresse IPv4. . . . . . . . . . . . . .:
   Masque de sous-réseau. . . . . . . . . :
   Adresse IPv4. . . . . . . . . . . . . .:
   Masque de sous-réseau. . . . . . . . . :
   Passerelle par défaut. . . . . . . . . :
share|improve this answer
Thank you. So long ago that I don't remember why I asked the question. – djangofan May 3 at 16:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.