Changing network setting by a batch file in Windows

Wednesday, 20 June 2007, 1:21 | Category : Technology
Tags :

You may change network setting (IP, DNS etc) using batch file in Windows XP.
Lets say, you want a config shown below:


To do so, create a file names as changeIP.bat and write following lines into that:
netsh int ip set address name=”Local Area Connection” source=static addr=10.129.163.208 mask=255.255.255.0
netsh int ip set address name=”Local Area Connection” source=static gateway=10.129.163.1 gwmetric=0
netsh int ip set dns name=”Local Area Connection” source=static addr=202.144.13.50 register=PRIMARY
netsh int ip add dns name=”Local Area Connection” addr=202.144.50.4 index=2
netsh int ip set wins name=”Local Area Connection” source=static addr=none

Now whenever you execute this bat file, your network setting will be changed as required

Related posts:

  1. File sharing in Windows XP Professional
  2. How to enable File Name completion on command prompt
  3. How to remove MSN messenger completely from Windows
  4. Export File name in servlet/jsp