Luc*_* NN 11
您可以使用Visual Basic脚本和批处理创建一个简单的"窗口小部件".
例:
proxy_off.bat
echo off
cls
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
change_shortcut_on
exit
Run Code Online (Sandbox Code Playgroud)
proxy_on.bat
echo off
cls
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
change_shortcut_off
exit
Run Code Online (Sandbox Code Playgroud)
change_shortcut_off.vbs
Set sh = CreateObject("WScript.Shell")
Set shortcut = sh.CreateShortcut("C:\Users\%USERNAME%\Desktop\Proxy.lnk")
shortcut.TargetPath = "C:\Users\%USERNAME%\Proxy Settings\proxy_off.bat"
shortcut.IconLocation = "C:\Users\%USERNAME%\Proxy Settings\Icons\on.ico"
shortcut.Save
Run Code Online (Sandbox Code Playgroud)
change_shortcut_on.vbs
Set sh = CreateObject("WScript.Shell")
Set shortcut = sh.CreateShortcut("C:\Users\%USERNAME%\Desktop\Proxy.lnk")
shortcut.TargetPath = "C:\Users\%USERNAME%\Proxy Settings\proxy_on.bat"
shortcut.IconLocation = "C:\Users\%USERNAME%\Proxy Settings\Icons\off.ico"
shortcut.Save
Run Code Online (Sandbox Code Playgroud)
说明:
完成!非常简单有效.现在,您可以单击"Proxy.lnk"(桌面中的快捷方式)将代理设置为"打开"和"关闭".
Proxy On Proxy On

在图标网址:http://s30.postimg.org/sgoerz0od/image.png
关闭图标网址:http://s13.postimg.org/9zha38zkj/off.png
| 归档时间: |
|
| 查看次数: |
10338 次 |
| 最近记录: |