Using scripts to modify LAN settings for IE-automatic configuration scripts

Source: Internet
Author: User

First of all, the background of this issue: The company's proxy configuration script restrictions too strict, the development of their own host is often recognized as illegal address, this is very annoying, so I copied the company's configuration script is saved locally, and then made some changes, so that their host is legitimate, but more annoying, The company's security system will periodically restore the proxy configuration script to the official, so I hope I have a program can monitor the configuration of proxy settings, if not my own, immediately correct, to do this, first of all, you have to be able to modify the settings in a scripted way.

Many online use of script to modify the agent's article, are directly changed proxy server settings, check for a long time did not find what I want, but these articles are still very enlightening, ie these settings should all exist in the registration table. So I based on the current set of automatic configuration script a keyword in the registry search, found that the original is set here: [Hkey_local_machine\system\controlset001\services\nlasvc\parameters\ Internet\manualproxies]

This will be done, write the registry file or use the command line to modify this setting:

1, the registry method, edit a text file as follows:

REGEDIT4

[Hkey_local_machine\system\controlset001\services\nlasvc\parameters\internet\manualproxies]
@= "FilePath"

@ Represents the default value for this key, filepath can be "FILE://C:/SOME.PAC", which means a local file or a URL that uses a proxy file that is common on a network. Then save as Xxx.reg, and then double-click the saved file, the corresponding settings have been modified;

2. Command line mode, use the Red Add command:

Reg ADD hkey_local_machine\system\controlset001\services\nlasvc\parameters\internet\manualproxies/ve/d "Val"

This command means adding a key value to the registry, overwriting its value if it already exists,/ve representing the default value, or/D "Val" to use Val to set the key, and a detailed reg command to click Reg/? in the command prompt. Be sure to run with administrator privileges when using the command line mode, or you cannot modify it.


Now the problem is solved, just write a script to invoke the command-line command.

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.