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% gwmetric = 1
ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%
ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%
ECHO Setting Internet Explorer Homepage to %varhome%
reg add "hkcusoftwaremicrosoftinternet explorermain" /v "Start Page" /d "%varhome%" /f
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2. How set IP Address to DHCP by running .bat file
Copy the below script to a notepad and then run the bat file after saving the notepad as .bat file.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@ECHO OFF
ECHO This fanciness is brought to you by AVINASH PILLAI!
ECHO Resetting IP Address and Subnet Mask For DHCP
netsh int ip set address name = "Local Area Connection" source = dhcp
ECHO Resetting DNS For DHCP
netsh int ip set dns name = "Local Area Connection" source = dhcp
ECHO Resetting Windows Internet Name Service (WINS) For DHCP
netsh int ip set wins name = "Local Area Connection" source = dhcp
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Thanks & Regards
Avinash PillaiURL : http://avinashpillai.blogspot.com
Email: avinashp25[AT]gmail[DOT]com
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% gwmetric = 1
ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%
ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%
ECHO Setting Internet Explorer Homepage to %varhome%
reg add "hkcusoftwaremicrosoftinternet explorermain" /v "Start Page" /d "%varhome%" /f
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2. How set IP Address to DHCP by running .bat file
Copy the below script to a notepad and then run the bat file after saving the notepad as .bat file.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@ECHO OFF
ECHO This fanciness is brought to you by AVINASH PILLAI!
ECHO Resetting IP Address and Subnet Mask For DHCP
netsh int ip set address name = "Local Area Connection" source = dhcp
ECHO Resetting DNS For DHCP
netsh int ip set dns name = "Local Area Connection" source = dhcp
ECHO Resetting Windows Internet Name Service (WINS) For DHCP
netsh int ip set wins name = "Local Area Connection" source = dhcp
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Thanks & Regards
Avinash PillaiURL : http://avinashpillai.blogspot.com
Email: avinashp25[AT]gmail[DOT]com
Comments