使用bat文件快速备份还原网络配置
使用bat文件快速备份还原网络配置
对于经常使用笔记本电脑在两地上网的朋友,切换网络配置就成了家常便饭,总是该来该去实在麻烦,用bat文件可以使一切都变得简单。
首先选择“开始→运行”,输入:cmd,回车后进入命令行界面,然后输入:netsh -c interface dump>d:\home.txt,回车后,系统将会把你当前的网络配置备份到d盘的home.txt文档中。
然后开始编写bat文件,只有简单的一行:netsh -f d:\home.txt,保存为bat文件,以后双击该文件就会应用home.txt中的网络配置。如果你觉得两个文件烦,也可以将两个文件写成一个bat文件:
@echo off
netsh interface ip set address name="本地连接" source=static addr=10.10.10.1 mask=255.255.255.0
//设置本地连接的ip地址为:10.10.10.1,子网掩码为:255.255.255.0
netsh interface ip set address name="本地连接" gateway=110.10.10.2 gwmetric=0
//设置网关
netsh interface ip set dns name="本地连接" source=static addr=10.10.10.3 register=PRIMARY
//设置主dns
netsh interface ip add dns name="本地连接" addr=10.10.10.4
//设置备份dns
netsh interface ip set wins name="本地连接" source=static addr=none
//设置wins
<
,使用bat文件快速备份还原网络配置
《使用bat文件快速备份还原网络配置》相关文章
- 使用bat文件快速备份还原网络配置
- › 使用bat文件快速备份还原网络配置
- 在百度中搜索相关文章:使用bat文件快速备份还原网络配置
- 在谷歌中搜索相关文章:使用bat文件快速备份还原网络配置
- 在soso中搜索相关文章:使用bat文件快速备份还原网络配置
- 在搜狗中搜索相关文章:使用bat文件快速备份还原网络配置
tag: 网络知识,计算机网络知识,电脑网络知识,电脑教程大全 - 网络知识