Use the bat batch processing script to automatically set the IP address and IE proxy

Source: Internet
Author: User

When switching between different network environments, You need to manually modify the IP address and IE proxy settings, which is complicated. You can write the corresponding bat batch processing script to automatically complete the configuration and achieve one-click switching. The following is an example:

@ Echo off: Echo set IP...: netsh interface IP Set address name = "Local Connection" Source = static ADDR = xxx. xxx. xxx. xxx mask = xxx. xxx. xxx. XXX: Echo set gateway ....: netsh interface IP Set address name = "Local Connection" Source = static gateway = xxx. xxx. xxx. xxx gwmetric = 1 echo set ie Proxy: XXX. xxx. xxx. XXX: 8080reg Add "hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings"/V proxyenable/T REG_DWORD/D 1/freg Add "hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet settings "/V proxyserver/D" XXX. xxx. xxx. XXX: 8080 "/F :: skip the proxy server Reg Add "hkcu \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings"/V proxyoverride/T REG_SZ/D "<local>"/fecho flash ... ipconfig/flushdns

XXX. XXX is the IP address of the corresponding attribute. For example, "XXX. XXX: 11th" in line 8080 is the IP address and port (8080) of the target proxy server. Both of them can be modified according to their own environment.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.