Microsoft
Software
Hardware
Network
Question : Need script to change static IP address for WinXP
I use WinXP Professional at home and office. Although I have the same ISP at both, I am required to change the IP address depending on where I am.
I need one script or batch file that I can run under WinXP that will automatically change my IP from:
172.16.10.23 to 192.168.11.8
Then another script that will change it back.
Hopefully a simple problem if you know how!
Thanks
Answer : Need script to change static IP address for WinXP
Fatal_Exceptions answer is extremely thorough, and using the "dump" option is the better way to go.. However, if you want specific examples of netsh batch files, I have included 2 below. Both run then display current config and pauses for you to view. You can remove the last 2 lines. 1st is for static IP, second for DHCP. Substitute your values/IP's as necessary. The network connection name is assumed to be the default "Local Area Connection".
**************************
**********
**********
*****
rem Reset network Settings for static IP
netsh interface ip set address name = "Local Area Connection" source = static addr = 10.0.0.99 mask = 255.255.255.0
netsh interface ip set address name = "Local Area Connection" gateway = 10.0.0.254 gwmetric = 1
netsh interface ip set dns name = "Local Area Connection" source = static addr = 24.222.0.1
netsh interface ip add dns name = "Local Area Connection" addr = 24.222.0.2
netsh interface ip show config
pause
**************************
**********
**********
***
rem Reset network settings for DHCP
netsh interface ip set address name = "Local Area Connection" source = dhcp
netsh interface ip set dns name = "Local Area Connection" source = dhcp
netsh interface ip set wins name = "Local Area Connection" source = dhcp
netsh interface ip show config
pause
Random Solutions
Unable to connect to ISA2004 with client utility.
Netware 5.1 Routing/IP issue
Fixed Cellular Terminal using TC35i GSM module
DNS server doesnt show msdcs ,sites , udp and other folders
How can i trace gmail sender IP
what is Ip phones licence are , why I´ll need them ?
NetBIOS name resoltion issue in domain environment
Fiber Backbone
Access remote disk with Linksys VPN Router to Linksys VPN Router
NullPointerException while deserializing SOAP request in WebSphere