windows7 cmd命令改变IP地址、 DNS和代理设置
改变IP地址设置
@echo off netsh interface ipv4 set address "无线网络连接" static 192.168.100.200 255.255.255.0
192.168.100.1netsh interface ipv4 set dns name="无线网络连接" source=static addr=8.8.4.4netsh interfac e ipv4 add dns name="无线网络连接"addr=61.177.7.1 index=2echo ------------------------------------------------------------------------------echo ---------------------------------------------------------------------------------echo -----------------------------
改为DHPC 自动获取设置
@echo offf netsh interface ipv4 set address name="无线网络连接" source=dhcp netsh interface ipv4 set dns name="无线网络连接" source=dhcp echo ------------------------------
开启IE代理服务器设置
@echo off title 自动设置代理服务器echo正在设置代理服务器„„reg add"HKCUSoftwareMicros oftWindow sCurrentVersionInternet Settings" /v ProxyEnable/t REG_DWORD/d 1 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyServer /d"192.168.100.100:808" /f reg add"HKCUSoftwareMicrosoftWindow sCurrentVersionInternet Settings" /v ProxyOverride /t REG_SZ/d"" /f
echo正在刷新设置„„ipconfig/flushdns
关闭IE代理服务器设置:
@echo off title 自动清除IE代理echo正在清空代理服务器设置„„reg add"HKCUSoftwareMicros oftWindow sCurrentVersionInternet Settings" /v ProxyEnable/t REG_DWO RD/d 0/f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyServer /d"" /f reg add"HKCUSoftwareMicros oftWindow sCurrentVersionInternet Settings" /v ProxyOverride /t REG_SZ/d 0/f
echo代理服务器设置已经清空echo正在刷新设置„„ipconfig/flushdns
批处理自动选择网络设置全文
注复制到记事本文件中别存为后缀改为”.bat”文件。在win7系统中运行时会提示 “请求的操作需要提升为<作为管理员运行>”只需要在此bat文件上右击“以管理员身份运行”即可。
全文如下
@echo off color 1f title windows 7多网络环境自动切换管理echo.echo ********************************************echo *** windows 7双网络环寺自动切换管理 ***echo *** 作者王明洪MSN: ***echo ********************************************echo *** 设置IP参数,设置IE代理 ***echo.echo.goto me nus
:me nus echo.echo请选择:echo.echo 1切换到家庭代理网络echo.echo 2切换到学校自动获取IP地址网络。echo.
echo 3放弃设备退出echo.set/p select=请输入菜单对应数字后回车:if/i "%se le ct%"=="1"goto home if/i "%select%"=="2"goto school if/i "%select%"=="3"exit goto me nus
:ho me cls netsh interface ip reset "无线网络连接"echo设置IP. . .设置网关. . . . .设置子网netsh interface ipv4 set address "无线网络连接" static 192.168.100.200
255.255.255.0192.168.100.1echo设置DNS. . .netsh interface ipv4 set dns name="无线网络连接"source=static addr=8.8.4.4netsh interface ipv4 add dns name="无线网络连接"addr=61.177.7.1 index=2echo设置IE代理. . .echo正在设置代理服务器„„reg add "HKCUSo ftwareMicroso ftWindowsCurrentVersionInternet Settings" /v ProxyEnab le/t REG_DWO RD/d 1 /f reg add "HKCUSo ftwareMicroso ftWindowsCurrentVersionInternet Settings" /v ProxyS e rver/d"192.168.100.100:808" /f reg add "HKCUSo ftwareMicroso ftWindowsCurrentVersionInternet Settings" /v ProxyOverride/t REG_SZ/d"" /f echo正在刷新设置„„ipconfig/flushdns goto exit
:school cls echo设置学校网络自动IP地址.netsh interface ipv4 set address name="无线网络连接" source=dhcp echo设置DNS. . .netsh interface ipv4 set dns name="无线网络连接"source=dhcp echo正在清除代理服务器设置„„echo正在清空代理服务器设置„„reg add "HKCUSo ftwareMicroso ftWindowsCurrentVersionInternet Settings" /v ProxyEnab le/t REG_DWO RD/d 0/f reg add "HKCUSo ftwareMicroso ftWindowsCurrentVersionInternet Settings" /v ProxyS e rver/d"" /f reg add "HKCUSo ftwareMicroso ftWindowsCurrentVersionInternet Settings" /v ProxyOverride/t REG_SZ/d 0/f echo代理服务器设置已经清空echo正在刷新设置„„
ipconfig/flushdns goto exit
:exit cls echo.cho.echo.echo.echo.echo************恭喜!网络设置以完成。echo.echo.echo.echo.echo.echo.pause e x it
设置有线与无线同时连接网络route de lete 0.0.0.0route-p add 10.0.0.0 mask 255.0.0.0172.16.64.1 metric 1route-p add 0.0.0.0 mask 0.0.0.0192.168.160.1 metric 25
legionbox怎么样?legionbox是一家来自于澳大利亚的主机销售商,成立时间在2014年,属于比较老牌商家。主要提供VPS和独立服务器产品,数据中心包括美国洛杉矶、瑞士、德国和俄罗斯。其中VPS采用KVM和Xen架构虚拟技术,硬盘分机械硬盘和固态硬盘,系统支持Windows。当前商家有几款大硬盘的独立服务器,可选美国、德国和瑞士机房,有兴趣的可以看一下,付款方式有PAYPAL、BTC等。...
atcloud主要提供常规cloud(VPS)和storage(大硬盘存储)系列VPS,其数据中心分布在美国(俄勒冈、弗吉尼亚)、加拿大、英国、法国、德国、新加坡,所有VPS默认提供480Gbps的超高DDoS防御+不限流量,杜绝DDoS攻击骚扰,比较适合海外建站等相关业务。ATCLOUD.NET是一家成立于2020年的海外主机商,主要提供KVM架构的VPS产品、LXC容器化产品、权威DNS智能解...
wordpress高级全行业大气外贸主题,wordpress通用全行业高级外贸企业在线询单自适应主题建站程序,完善的外贸企业建站功能模块 + 高效通用的后台自定义设置,更实用的移动设备特色功能模块 + 更适于欧美国外用户操作体验 大气简洁的网站风格设计 + 高效优化的网站程序结构,更利于Goolge等SEO搜索优化和站点收录排名。点击进入:wordpress高级全行业大气外贸主题主题价格:¥398...