See Also:
http://www.printlogger.com   Printer accounting software
http://www.sys-monitoring.com   System monitoring software
http://www.hs-lab.com   Software for Business and Home
http://win-printing.com   Windows Printing Software,
Articles and Press Release
     
Handy Software Lab's Software Products
     
HSLAB Force Down   HSLAB Print Logger Family
HSLAB Shutdown Folder   HSLAB Sys Monitor
HSLAB Logger   HSLAB Prefetch Manager
HSLAB HTTP Monitor Family   HSLAB WhoIs
HSLAB Security TrackerFamily    
     
     

Common questions

ID #1162

How to set proxy for my Windows Vista/Windows 7 computer system wide?

WinHttp for Windows XP and Windows Server 2003 comes with variety of tools that allow the users and system administrators to configure the default proxy settings (ProxyCfg.exe), tracing settings (WinHttpTraceCfg.exe) and configure client certificates (WinHttpCertCfg.exe).

ProxyCfg.exe has been part of the operating system, while WinHttpTraceCfg.exe and WinHttpCertCfg.Exe have to be downloaded separately as part of the Windows Server 2003 Resource Kit Tools.

To avoid the need of tools that don?t ship with Windows and to make the user experience more consistent with the other networking components, ProxyCfg.exe and WinHttpTraceCfg.exe are deprecated for Windows Vista and replaced with Net Shell (Netsh) extensions. WinHttpCertCfg.Exe is deprecated as well and its functionality is integrated in the new Certificates MMC snap-in.

If you are not familiar with Netsh, you can take a look at Windows XP online help (here is a good link). In this post series we will go over some samples on how to configure the WinHttp proxy, tracing settings and client certification settings. Please note that the samples describe the current behavior in Windows Vista Beta 2 and that the command syntax is likely to change a bit for Vista RTM.

To start, you can load up netsh on a Vista CTP build and check it out. The new context that WinHttp introduces is WinHttp. You can get to it by just typing winhttp from the root netsh context:

C:\> netsh

netsh> winhttp

netsh winhttp>

From here there are two nested contexts available:

proxy - Configures proxy settings in WinHTTPtracing - Configures tracing in WinHTTP

Note that at any point you can type ? to get the list of supported commands. Also, typing "command" ? will show all the parameters for that command.

After running netsh and going to the winhttp context, we switch to the proxy context by typing "proxy":

netsh winhttp> proxy

netsh winhttp proxy>

 

Here is the list of available commands in that context:

netsh winhttp proxy>?

 

The following commands are available:

 

  (Skipping the inherited commands )

 

Commands in this context:

? - Displays a list of commands.

dump  - Displays a configuration script.

help  - Displays a list of commands.

import  - Imports proxy setting from IE.

reset  - Resets WinHTTP proxy setting to DIRECT.

set  - Configures WinHTTP proxy setting.

show  - Displays current WinHTTP proxy setting.

 

You can use ?show? to view the current settings, "set" to set the proxy settings and "import" to import current user's Internet Explorer proxy settings. If you?ve used proxycfg.exe you will find that this context provides the same functionality. The only exception is "dump", which creates a Netsh script with the current settings and can be executed later (on the same machine or different one) to set those settings.

Let's start by displaying the current proxy settings:

netsh winhttp proxy>show

 

Current WinHTTP proxy settings:

? Direct access (no proxy server).

 

Now let's set the proxy server for HTTP sites to "myproxy" (port 80 by default), proxy server for HTTPS sites to "sproxy" (port 88) and set the bypass list to "*.foo.com":

netsh winhttp proxy>set proxy-server="http=myproxy;https=sproxy:88" bypass-list=

"*.foo.com"

 

Current WinHTTP proxy settings:

 

Proxy Server(s) : http=myproxy;https=sproxy:88

Bypass List : *.foo.com

 

To reset the proxy settings to "direct" (not to use proxy servers), just type "reset":

netsh winhttp proxy>reset

 

Current WinHTTP proxy settings:

 

Direct access (no proxy server).

 

Another useful command is to import the proxy settings for the current user in Internet Explorer (note that different users may specify different proxy settings in IE):

Current WinHTTP proxy settings:

 

Proxy Server(s) : ieproxy:80

Bypass List :

 

Again, if you need to get a help on a command, just type it with question mark after it.

 

Tags: -

Related entries:

Last update: 2010-06-19 18:44
Author: Oleg
Revision: 1.0

Digg it! Share on Facebook Print this record Send article to a friend Show this as PDF file
Please rate this article:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry