View Single Post
  #4  
Old 02-16-2012, 02:26 AM
aladdin aladdin is offline
Senior Member
 
Join Date: Sep 2008
Posts: 66
Default

OK! I am using the following commands atonce:


Code:
@ECHO OFF
 
set varip=10.0.83.67
set varsm=255.255.255.224
set vargw=10.0.83.66
set vardns1=10.0.1.21
set vardns2=10.0.83.66
 
REM ***** You don’t need to change anything below this line! ******
 
ECHO This fanciness is brought to you by Saman Sadeghi!

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 Here are the new settings for %computername%:
netsh int ip show config
 
pause
And it works fine.................100% WORKING.......

Last edited by aladdin : 02-20-2012 at 05:24 AM.
Reply With Quote