Modify fields in the Registry
1. Add a proxy
Create a file, such as company_proxy.reg, and enter the following orange text
Regedit4 [HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings] "Proxyenable" = DWORD: 00000001 "Proxyserver" = "192.168.0.1: 8088" "Proxyoverride" = "192. 168 .*" |
A line must be written at the beginning: regedit4
[HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings] is its location in the Registry
Proxyenable indicates whether to enable the proxy server. DWORD: 00000001 indicates that the proxy server is enabled, and DWORD: 00000000 indicates that the proxy server is disabled.
Proxyserver is the proxy server address and port
Proxyoverride is an IP segment or domain name segment that does not use the proxy server. It can use * to represent any long string.
Double-click the newly created file to complete the settings.
Note that the newly configured proxy server does not take effect for the previously enabled IE, but is only valid for the later enabled IE.
2. Remove proxy
If you want to remove the IE proxy, you can use another file, for example, standard_proxy.reg. Enter the following orange text.
Regedit4 [HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings] "Proxyenable" = DWORD: 00000000 |
The proxyenable value is DWORD: 00000000, indicating that the proxy server is invalid.
3. Integrate the batch processing file
If you want to integrate the Registry file into a batch file, you can add a line of code to the batch file to execute the Registry file. For example:
Regedit/s company_proxy.reg
Note: company_proxy.reg must be in the same directory as the batch file.
The code in this article passes the test in Windows XP.
From: http://apps.hi.baidu.com/share/detail/2263693
Batch Tutorial: http://www.cnblogs.com/glaivelee/archive/2009/10/07/1578737.html