Hello, Try this one.
I didn't have where to test now, so if is not working we can fix it
Main Topics
Browse All TopicsHi Experts,
I am looking for a script (or batch command) that will switch TCP/IP settings from fixed IP address and DNS addresses to Automatic IP address and DNS addresses.
The OS is Windows XP.
It would be nice to also have the capability to switch back from automatic settings to fixed settings.
Regards,
Leigh
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: PsychotecPosted on 2009-11-05 at 00:33:04ID: 25747596
see here: fo.php/swi tch-networ k-settings - batch-fil es_t9048.h tml
http://www.astahost.com/in
For static use something like the following example:
*************
netsh interface ip set address name="Local Area Connection" source=static addr=111.222.333.444 mask=255.255.255.255
netsh interface ip set address name="Local Area Connection" gateway=555.666.777.888 gwmetric=0
netsh interface ip set dns name="Local Area Connection" source=static addr=999.111.222.333
netsh interface ip add dns name = "Local Area Connection" addr = 444.555.666.777
*************
For automatic use:
*************
netsh interface ip set address name="Local Area Connection" dhcp
netsh interface ip set dns name="Local Area Connection" dhcp
*************
I hope this helps