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=netsh interface ipv4 add dns name="无线网络连接"addr=61.177.7.1 index=2echo ------------------------------------------------------------------------------echo ---------------------------------------------------------------------------------echo -----------------------------
改为DHPC 自动获取设置
@echo offf netsh interface ipv4 set address name=netsh interface ipv4 set dns name=echo ------------------------------
开启IE代理服务器设置
@echo off
ti tle 自动设置代理服务器echo正在设置代理服务器……reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyEnable/t REG_DWORD/d 1 /f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyServer/d"192.168.100.100:808"/f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyOverride/t REG_SZ/d""/f echo正在刷新设置……ipconfig/flushdns
关闭IE代理服务器设置:
@echo off ti tle 自动清除I E代理echo正在清空代理服务器设置……reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyEnable/t REG_DWORD/d 0/f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyServer/d""/f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyOverride/t REG_SZ/d 0/f
echo代理服务器设置已经清空echo正在刷新设置……ipconfig/flushdns
批处理自动选择网络设置全文
注复制到记事本文件中别存为后缀改为” .b at”文件。在wi n 7系统中运行时会提示 “请求的操作需要提升为<作为管理员运行>”只需要在此bat文件上右击“以管理员身份运行”即可。
全文如下
@echo off color 1f title windows 7多网络环境自动切换管理echo.echo ********************************************echo *** windows 7双网络环寺自动切换管理 ***echo *** 作者王明洪MSN: ***echo ********************************************echo *** 设置IP参数,设置IE代理 ***echo.echo.goto menus
:menus echo.
echo请选择:echo.echo 1切换到家庭代理网络echo.echo 2切换到学校自动获取IP地址网络。echo.echo 3放弃设备退出echo.set/p select=请输入菜单对应数字后回车:if/i "%select%"=="1"goto home if/i "%select%"=="2"goto school if/i "%select%"=="3"exit goto menus
:home cls netsh interface ip resetecho设置IP.. .设置网关. .. ..设置子网netsh interface ipv4 set address "无线网络连接" static 192.168.100.200 255.255.255.0
192.168.100.1echo设置DNS. . .netsh interface ipv4 set dns name=netsh interface ipv4 add dns name="无线网络连接"addr=61.177.7.1 index=2
echo设置IE代理. ..echo正在设置代理服务器……reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyEnable/t REG_DWORD/d 1 /f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyServer/d"192.168.100.100:808"/f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyOverride/t REG_SZ/d""/f echo正在刷新设置……ipconfig/flushdns goto exit
:school cls echo设置学校网络自动IP地址.netsh interface ipv4 set address name=echo设置DNS. . .netsh interface ipv4 set dns name=echo正在清除代理服务器设置……echo正在清空代理服务器设置……reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyEnable/t REG_DWORD/d 0/f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v
ProxyServer/d""/f reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet 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
exit
设置有线与无线同时连接网络route delete 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
LayerStack(成立于2017年),当前正在9折促销旗下的云服务器,LayerStack的云服务器采用第 3 代 AMD EPYC™ (霄龙) 处理器,DDR4内存和企业级 PCIe Gen 4 NVMe SSD。数据中心可选中国香港、日本、新加坡和洛杉矶!其中中国香港、日本和新加坡分为国际线路和CN2线路,如果选择CN2线路,价格每月要+3.2美元,付款支持paypal,支付宝,信用卡等!...
国外商家提供Windows系统的并不常见,CheapWindowsVPS 此次提供的 2 款 VPS 促销套餐,提供 5 折永久优惠码,优惠后月付 4.5 美元起,价格还是挺诱人的,VPS 不限流量,接入 1Gbps 带宽,8 个机房皆可选,其中洛杉矶机房还提供亚洲优化网络供选择,操作系统有 Windows 10 专业版、2012 R2、2016、Linux等。Cheap Windows VPS是...
Nocser刚刚在WHT发布了几款促销服务器,Intel Xeon X3430,8GB内存,1TB HDD,30M不限流量,月付$60.00。Nocser是一家注册于马来西亚的主机商,主要经营虚拟主机、VPS和马来西亚独立服务器业务,数据中心位于马来西亚AIMS机房,线路方面,AIMS到国内电信一般,绕日本NTT;联通和移动比较友好,联通走新加坡,移动走香港,延迟都在100左右。促销马来西亚服务器...