How do I change proxy settings from command line in Windows 7?
I'm not talking about just the http_proxy. I need to set system-wide proxy settings (the ones in Internet properties setting). How do I do that?
|
How do I change proxy settings from command line in Windows 7? I'm not talking about just the |
||||
|
|
|
You'll need to configure a registry script that will make the changes you normally would via the Control Panel, and then merge the script to enable the proxy. You would also need an "undo" registry script to disable the changes. In my case, I have two scripts, enable.reg and disable.reg: Enable Proxy:
Disable Proxy:
In the "disable" script, the Note that the values you see above are modified for the purposes of this answer. The actual hex values are much longer. To use these scripts, I had a batch file for each one, looking something like this:
That is fully workable from the command line. |
||||
|
|
NetSh to the rescue!
|
|||||||
|
|
Simple and working solution retrieved from http://www.ehow.com/how_6887864_do-proxy-settings-command-prompt_.html Command to enable proxy usage:
Command to disable proxy usage:
Command to change the proxy address:
I have added line continuation (^) for improved readability. Also, in this case, it is more like a per-user setting than a system-wide setting. |
|||
|
|
|
Create a batch file and paste following content(It will toggle the Proxy state),
|
||||
|
|
|
I hope I am pointing you in the correct direction here, but if you are trying to access the proxy settings through "Internet options", simply open the start menu and type "internet option" (any setting or application you can locate this way also example "proxy"). You should then recognize this menu and be able to add your needed settings. |
|||||
|