netsh interface ip dump >ip.txt
/**
@file setip.bat
@brief set ip by customer's choise, 1-static, 2-dhcp
@author xiaoxf
@version 1.0
@date 2009-01-08
*/
///setip.bat start---------------------------------------------
@echo off
echo set ip
set /p type=请选择设置方式,1-静态,2-DHCP(1,2):
if /i %type%==1 goto :STATIC_IP
if /i %type%==2 goto :DHCP_IP
:STATIC_IP
netsh interface ip set address name="本地连接" source=static addr=192.168.71.100 mask=255.255.255.0
netsh interface ip set address name="本地连接" gateway=192.168.71.1 gwmetric=0
netsh interface ip set dns name="本地连接" source=static addr=61.154.22.41 register=PRIMARY
ipconfig
pause
exit
:DHCP_IP
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp register=PRIMARY
netsh interface ip set wins name="本地连接" source=dhcp
ipconfig
pause
exit
///setip.bat end-----------------------------------------------
阅读(924) | 评论(0) | 转发(0) |