Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change IP address through the registry 1

Status
Not open for further replies.

blegit1980

Programmer
Nov 21, 2005
53
CA
Hi, I would like to have .reg files associated with different IP addresses. Ex Environment1.reg would have IP address 192.168.1.20. Environment2.reg would have IP address 192.168.1.21 and so on. Could somebody let me know if this is possible and if so how? Thanks in advance.

Simon
 
I created a batch file for laptop users:

For at the office:
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.20 mask=255.255.0.0 gateway=192.168.1.1 gwmetric=1

For at home:
netsh interface ip set address name="Local Area Connection" source=dhcp

Works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top