I am looking for options which will allow me change connection proxy information of IE thru command line.
Click Start, click Run, type cmd, and then click OK. At the command prompt, type netsh winhttp show proxy, and then press ENTER.
To set up a proxy server using a setup scriptSelect the Start button, then select Settings > Network & Internet > Proxy. If you or your organization uses a setup script, turn on Use setup script. In the Script address box, enter the script address, then select Save.
IE proxy settings are controlled via registry keys. In general you should change them manually since this implementation detail can change between versions. However, as a debugging tool its useful.
Anyway, you can change registry keys from the command line using the REG
command. Specifically, I would just create some .reg files with the various states you want to change to and do REG IMPORT example-file.reg
. Or, failing that, REG ADD
.
proxycfg might be the tool you are looking for.
C:\>proxycfg /?
Microsoft (R) WinHTTP Default Proxy Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.
usage:
proxycfg -? : to view help information
proxycfg : to view current WinHTTP proxy settings
proxycfg [-d] [-p <server-name> [<bypass-list>]]
-d : set direct access
-p : set proxy server(s), and optional bypass list
proxycfg -u : import proxy settings from current user's
Microsoft Internet Explorer manual settings (in HKCU)
It works well in windows XP
In next windows versions, you can use:
C:\>netsh winhttp import proxy source=ie
to import proxy settings from Internet Explorer and
C:\>netsh winhttp reset proxy
to reset proxy settings for more help, use:
C:\>netsh winhttp /?
But these changes might not get reflected in Internet Explorer. Nonetheless, you should be able to use proxy in command line applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With