`
getclass
  • 浏览: 43193 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

windows IE 代理 bat

阅读更多

用bat脚本设置代理

 

 

@echo off
title 自动设置代理服务器

echo 正在设置代理服务器……
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "9.181.193.205:80" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "" /f

echo 正在刷新设置……
ipconfig /flushdns

 

清空代理设置

 

 

echo 正在清空代理服务器设置……
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d 0 /f

echo 代理服务器设置已经清空

echo 正在刷新设置……
ipconfig /flushdns

 

 

注意是英文的引号.

 

win7和XP都可以使用.

 

 

IP自动获取

 

netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp

 

设置IP/子网掩码/网关

 

netsh interface ip set address 本地连接 static 220.220.215.17 255.255.255.0 220.220.215.254

 

其中的"本地连接" 是机器上的连接名称

分享到:
评论
2 楼 getclass 2011-05-10  
congdepeng 写道
不错,因为公司和客户现场2边跑,我经常需要设置代理。。谢谢

大家都一样 呵呵
1 楼 congdepeng 2011-04-20  
不错,因为公司和客户现场2边跑,我经常需要设置代理。。谢谢

相关推荐

Global site tag (gtag.js) - Google Analytics