Skip to main content

Posts

Showing posts from March 18, 2011

Bat File to Set /Change IP Address in Windows

1. How set IP Address by running .bat file Copy the below script to a notepad, change the IP Addresses to your set of IP's and then run the bat file after saving the notepad as .bat file. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @ECHO OFF set varip=192.168.1.21 set varsm=255.255.255.0 set vargw=192.168.1.1 set vardns1=192.168.12.101 set vardns2=192.168.12.102 set varhome=www.google.com REM ***** You don’t need to change anything below this line! ****** ECHO This fanciness is brought to you by AVINASH PILLAI ! ECHO Setting IP Address and Subnet Mask netsh int ip set address name = "Local Area Connection" source = static addr = %varip% mask = %varsm% ECHO Setting Gateway netsh int ip set address name = "Local Area Connection" gateway = %vargw%