Use the script to modify LAN Settings of IE-automatic configuration script

Source: Internet
Author: User

First, the background of this problem: the company's proxy configuration script is too restrictive. during development, the host with its own configuration is often identified as an invalid address, which is annoying, so I copied the company's configuration script and saved it locally. Then I made some modifications to make my host legal, but more annoying, the company's security system regularly restores the agent configuration script to the official one, so I hope I have a program that can monitor the settings of the agent configuration script. If it is not my own, I will immediately correct it, to do this, you must first modify the settings in a script-based manner.

Many articles on the Internet that use scripts to modify proxies are directly set up on the proxy server. I haven't found what I want for a long time, but these articles are still very enlightening, these settings of IE should all exist in the registry. Therefore, I searched the registry based on a keyword of the currently configured automatic configuration script and found that it was originally set here: [HKEY_LOCAL_MACHINE \ SYSTEM \ controlset001 \ Services \ NlaSvc \ Parameters \ Internet \ manualproxies]

You can modify the settings by writing the Registry file or using the command line:

1. In registry mode, edit a text file as follows:

Regedit4

[HKEY_LOCAL_MACHINE \ SYSTEM \ controlset001 \ Services \ NlaSvc \ Parameters \ Internet \ manualproxies]
@ = "Filepath"

@ Indicates the default value of this key. The filepath can be "file: // C:/some. in the form of "Pac", it indicates a local file or a URL. It indicates that a public proxy file is used on the network and then saved as XXX. reg. Double-click the saved file and modify the settings;

2. Use the red Add command in the command line mode:

Reg add HKEY_LOCAL_MACHINE \ SYSTEM \ controlset001 \ Services \ NlaSvc \ Parameters \ Internet \ manualproxies/ve/D "Val"

This command adds a key value to the Registry. if it already exists, it overwrites the value./ve indicates the default value, And/D "Val" indicates that you want to use Val to set the key, the detailed Reg command can be typed in REG /? View. When using the command line method, you must use the Administrator permission to run the command. Otherwise, the command cannot be modified.

Now the problem is solved. You only need to write a script to call the command line command periodically.

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.