Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have proxy settings maintained in internet settings in control panel and it works in most GUI applications but I'd like to get it to work in command prompt. Is there a way to set it for the command prompt for the sessions?

share|improve this question
up vote 3 down vote accepted

The command-prompt doesn't need proxy settings. The programs you invoke from the command-prompt are what need proxy settings. Those programs will work the same as most GUI applications in that they'll either get them from the control panel (ie- system wide settings) or there will be some way to pass proxy parameters to the program or create a configuration for the program. Often a command-line program will get proxy information from an environment variable that you set for it. It's completely dependent on the program, though.

Is there a specific program that you're trying to configure to use a proxy?

share|improve this answer
    
you're right. I was using mercurial and it does have a configuration for proxy. Thanks! – Xster Dec 2 '11 at 21:56
    
Ah, yep. Environment variable there :) – squillman Dec 2 '11 at 22:00

Using Netsh

  1. View your TCP/IP settings
  2. Reset the TCP/IP Stack
  3. Delete arp cache
  4. Configure your computer’s IP address and other TCP/IP related settings
  5. Import/Export your TCP/IP settings
  6. Configure firewall
  7. Show network parameters
  8. Launch the GUI Network Diagnostic Program

Description:

Usage:

netsh [-a AliasFile] [-c Context] [-r RemoteMachine] [-u [DomainName\]UserName] [-p Password | *] [Command | -f ScriptFile]

The following commands are available:

Commands in this context:

?              - Displays a list of commands.
add            - Adds a configuration entry to a list of entries.
advfirewall    - Changes to the `netsh advfirewall' context.
bridge         - Changes to the `netsh bridge' context.
delete         - Deletes a configuration entry from a list of entries.
dhcpclient     - Changes to the `netsh dhcpclient' context.
dnsclient      - Changes to the `netsh dnsclient' context.
dump           - Displays a configuration script.
exec           - Runs a script file.
firewall       - Changes to the `netsh firewall' context.
help           - Displays a list of commands.
http           - Changes to the `netsh http' context.
interface      - Changes to the `netsh interface' context.
ipsec          - Changes to the `netsh ipsec' context.
lan            - Changes to the `netsh lan' context.
mbn            - Changes to the `netsh mbn' context.
namespace      - Changes to the `netsh namespace' context.
nap            - Changes to the `netsh nap' context.
netio          - Changes to the `netsh netio' context.
p2p            - Changes to the `netsh p2p' context.
ras            - Changes to the `netsh ras' context.
rpc            - Changes to the `netsh rpc' context.
set            - Updates configuration settings.
show           - Displays information.
trace          - Changes to the `netsh trace' context.
wcn            - Changes to the `netsh wcn' context.
wfp            - Changes to the `netsh wfp' context.
winhttp        - Changes to the `netsh winhttp' context.
winsock        - Changes to the `netsh winsock' context.
wlan           - Changes to the `netsh wlan' context.

The following sub-contexts are available:

 advfirewall bridge dhcpclient dnsclient firewall http interface ipsec lan mbn n
amespace nap netio p2p ras rpc trace wcn wfp winhttp winsock wlan
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .