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
spinservers是Majestic Hosting Solutions LLC旗下站点,主要提供国外服务器租用和Hybrid Dedicated等产品的商家,数据中心包括美国达拉斯和圣何塞机房,机器一般10Gbps端口带宽,高配置硬件,支持使用PayPal、信用卡、支付宝或者微信等付款方式。目前,商家针对部分服务器提供优惠码,优惠后达拉斯机房服务器最低每月89美元起,圣何塞机房服务器最低每月...
国外商家提供Windows系统的并不常见,CheapWindowsVPS 此次提供的 2 款 VPS 促销套餐,提供 5 折永久优惠码,优惠后月付 4.5 美元起,价格还是挺诱人的,VPS 不限流量,接入 1Gbps 带宽,8 个机房皆可选,其中洛杉矶机房还提供亚洲优化网络供选择,操作系统有 Windows 10 专业版、2012 R2、2016、Linux等。Cheap Windows VPS是...
这两天Linode发布了十八周年的博文和邮件,回顾了过去取得的成绩和对未来的展望。作为一家运营18年的VPS主机商,Linode无疑是有一些可取之处的,商家提供基于KVM架构的VPS主机,支持随时删除(按小时计费),可选包括美国、英国、新加坡、日本、印度、加拿大、德国等全球十多个数据中心,所有机器提供高出入网带宽,最低仅$5/月($0.0075/小时)。This month marks Linod...