自定义配置网络ip、网关、dns的批处理文件
发布时间:2016-12-28 来源:查字典编辑
摘要:自定义配置网络ip、网关、dns.bat复制代码代码如下:@echooffsetslection1=set/pslection1=请输入IP...
自定义配置网络ip、网关、dns.bat
复制代码 代码如下:
@echooff
setslection1=
set/pslection1=请输入IP地址:
netshinterfaceipsetaddressname="本地连接"source=staticaddr=%slection1%mask=255.255.255.0
setslection2=
set/pslection2=请输入网关地址:
netshinterfaceipsetaddressname="本地连接"gateway=%slection2%gwmetric=0
setslection3=
set/pslection3=请输入主dns地址
netshinterfaceipsetdnsname="本地连接"source=staticaddr=%slection3%register=PRIMARY
setslection4=
set/pslection4=请输入备份dns地址
netshinterfaceipadddnsname="本地连接"addr=%slection4%
netshinterfaceipsetwinsname="本地连接"source=staticaddr=none
pause