Home Article Windows Batch file to Assign Ip addresses Automatically 
Batch file to Assign Ip addresses Automatically PDF Print E-mail
User Rating: / 1
PoorBest 
Windows - Articles
Written by Aman Dhally   
Thursday, 21 January 2010 17:16

Many times I fed up by assigning ip addresses to the Lan adapter manually, you need to open Network connection > select adapter > properties > select TCP/IP > then insert ip address manually.

If you are doing these task daily, then the better option to create a batch file, after creating batch file you just need to run and rest of all it will do you for.

 The syntax for Batch file is :

-----------------------------------------------------------------------------------------------

@echo created by: Aman Dhally, appying office profile, please wait. . .
@echo off
color 20
netsh interface ip set address "Local Area Connection" static 192.168.1.95 255.255.255.0 192.168.1.1 1
netsh interface ip set dns "Local Area Connection" static 192.168.1.66

---------------------------------------------------------------------------------------------------------------------------------------

and save this file is .bat file

After saving the file, Just double click the BAT file or run it. It will assign the IP adrees to the Lan Adapter Automatically..

 

For INFO :::

 

  • Local Area Connection   : Connection Name of your lan Adapter
  • 192.168.1.95                : The IP Address which you want to use
  • 255.255.255.0              : Subnet Mask
  • 1                                 : Metric
  • 192.168.1.1                 : Your Internet Gateway
  • 192.168.1.66               : your DNS Server

Thanks a lot .

 

Aman Dhally

 

Comments
RSS
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

Statistics

Content View Hits : 75216

Powered by Solutions-Guru.com!. Designed by: budget hosting reseller hosting packages Valid XHTML and CSS.