General discussion

Locked

How to change IP address, DNS, WINS using batch file

By dingdong ·
Please help on how to this by doing a script for the batch file without restarting winxp pc and manually configure each numbers.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Try the Q&A section

by jdclyde In reply to How to change IP address, ...

That is what it is for.

You would get your answer there quickly I am sure.

Collapse -

Here is what you need

by hisham_m_farid In reply to How to change IP address, ...

Look at this http://support.microsoft.com/?kbid=242468
also this http://www.petri.co.il/configure_tcp_ip_from_cmd.htm

You will find the full details.

Welcome.

Collapse -

Here is Solution

by sindhu.arvind In reply to Here is what you need

netsh interface ip set address "Local Area Connection" static 192.168.1.10 255.255.255.0 192.168.1.1 1

U can use your Own IP, Subnet Mask & Gateway

First One Is IP, Second Subnet Mask, & Third Gateway.

Collapse -

by giadzich In reply to How to change IP address, ...

I am also interested in this. THhanks.

Collapse -

How to change IP address, DNS using batch file

by y2jay_j In reply to How to change IP address, ...

Here is the code to set static ip address. Make a batch file and paste following commands.

This code should work in XP and Vista. Vista users have to run the batch file as an administrator. (Right click the batch file and click "Run as Administrator")
_________________________________________

:: Enter your static ip address, Subnet Mask and Default Gateway
netsh interface ip set address name = "Wireless Network Connection" source = static addr = 192.168.0.12 mask = 255.255.255.0 gateway = 192.168.0.2 gwmetric = 1

:: Enter your Preferred DNS Server
netsh interface ip set dns name="Wireless Network Connection" static 24.92.22.90

:: Enter your Alternate DNS Server, if you dont know remove the following line
netsh interface ip add dns name="Wireless Network Connection" 24.92.22.102 index=2
__________________________________________


To reset these values to automatic settings make anther batch file and paste following commands.

__________________________________________

netsh interface ip set address name="Wireless Network Connection" source=dhcp

netsh interface ip set dns name="Wireless Network Connection" source=dhcp register=primary

netsh interface ip set wins name="Wireless Network Connection" source=dhcp
__________________________________________


- Jay

Back to IT Employment Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums