Windows Update requires two other clients to work, i.e. WinHTTP (Windows HTTP Service) and BITS (Background Intelligent Transfer Service) to scan and download the available updates from Microsoft servers.
Interestingly, none of these services is using Internet Explorer proxy setting. Indeed, Windows Update clients refers to WinHTTP proxy server setting that is either configured manually by user or automatically updated by Web Proxy Auto Detect (WPAD) feature of the connecting network.
Therefore, laptop users who access Internet via proxy server in corporate network with WPAD feature enabled are likely have problem to run Windows Update after switching to direct network (e.g. home broadband, public WIFI, etc) or other network that enforce proxy server for Internet access but disable Web Proxy Auto Detect setting.
In case WinHTTP proxy server setting is not updated, you have to do it manually.
To disable WinHTTP proxy server
Execute
1) Open an elevated Command Prompt window (i.e. Command Prompt window with real Administrator privilege).
2) Execute
Configure WinHTTP proxy setting
If the connecting network does not enable Web Proxy Auto Detect setting but requires proxy server (e.g. IP 188.8.6.7 and port number 80) to access Internet:
1) Open a Command Prompt window with real Administrator privilege.
2) Execute
To view netsh help and example on WinHTTP proxy configuration, execute this
According to the netsh winhttp help, it’s possible to define different proxy server for http and/or https connection.
Interestingly, none of these services is using Internet Explorer proxy setting. Indeed, Windows Update clients refers to WinHTTP proxy server setting that is either configured manually by user or automatically updated by Web Proxy Auto Detect (WPAD) feature of the connecting network.
Therefore, laptop users who access Internet via proxy server in corporate network with WPAD feature enabled are likely have problem to run Windows Update after switching to direct network (e.g. home broadband, public WIFI, etc) or other network that enforce proxy server for Internet access but disable Web Proxy Auto Detect setting.
WPAD setting is normally configured by network administrator in either DNS (Domain Name System) or DHCP (Dynamic Host Configuration Protocol) option.
In case WinHTTP proxy server setting is not updated, you have to do it manually.
The following guide to disable / enable WinHTTP proxy server is based on Windows Vista SP1. Anyway, it should be working on other Windows versions that support netsh command set.
To disable WinHTTP proxy server
Execute
netsh winhttp show proxy
to check if you have a proxy server configured for WinHTTP. To disable the WinHTTP proxy setting:1) Open an elevated Command Prompt window (i.e. Command Prompt window with real Administrator privilege).
2) Execute
netsh winhttp reset proxy
to reset WinHTTP proxy setting to DIRECT (i.e. to connect to Internet directly without using any kind of proxy server).Configure WinHTTP proxy setting
If the connecting network does not enable Web Proxy Auto Detect setting but requires proxy server (e.g. IP 188.8.6.7 and port number 80) to access Internet:
1) Open a Command Prompt window with real Administrator privilege.
2) Execute
netsh set proxy 188.8.6.7:80
. To view netsh help and example on WinHTTP proxy configuration, execute this
netsh winhttp set proxy help
According to the netsh winhttp help, it’s possible to define different proxy server for http and/or https connection.
Custom Search
“Execute netsh set proxy 188.8.6.7:80”
should be…
“Execute netsh set winhttp proxy 188.8.6.7:80”
Thank you for highlighting the typo.
Thank you for this bit of information, it helped me a great deal to understand something that was driving me mad.
Autoruns and possibly other stuff by Sysinternals use the same settings. I believed my computer was hijacked although all the malware scans I did and the manual investigation of registry keys, autorun entries and antirootkit scans (above all gmer) all gave the same result: my computer was clean. But you ignore one single thing and you lose hours. That happened to me, until I came to your site after the nth google search, and everything was once again fine after having cleaned the winhttpd proxy.
Thanks again, your info have proven valuable to me.
How about using proxycfg instead of netsh?
See: http://all-things-pure.blogspot.com/2010/01/download-fails-for-windows-update.html
Thanks for your article. I follow you guide to setup proxy in a windows 7 workstation but I receive “Access denied” when I run windows update.
Why? is there a way to setup username/password for proxy?
Thanks in advance!
I am not sure why your Windows Update pops up “access denied”.
If you see this while running netsh command, that is caused by not running command prompt window with elevated privilege.
You need to run your Command Prompt as an administrator. Right click on the cmd icon and Run as Administrator.
You will then not get Access Denied.
is it workin for windoes seven as well??
coz while doin it i get the error command not found
help me out !!!
I have windows 7, set and reset proxy and testing it with show command going fine, but this didn’t reflecting and affecting IE proxy setting and no changes happened to it’s configuration. Please I need to enable/disable proxy of IE from a batch file.
IE proxy settings is different from WinHTTP proxy setting, therefore whatever changes made to WinHTTP does not affect IE proxy server setting.
thanx for this article.
you may reconsider, whether the BLACK background is really needed.
it is no fun to read through this side.
jast as a hint…
best wishes,
thomas
@Thomas, you’re not the first but the certainly the last to comment about the black theme!
After 4+ years, the body is now whiten!
but where in the registry does that value get saved?
“laptop users who access Internet via proxy server in corporate network with WPAD feature enabled are likely have problem to run Windows Update after switching to direct network”
this is the exact issue I’ve been having but with Windows XP. I even logged a help request via microsoft, which ended up being no help.
Of course with XP it’s done via proxycfg.exe, but even there the connection was listed as no proxy. I simply “reset” the connection to be no proxy again (even though it was already set like that) and now Windows Update works fine and doesn’t look for my work proxy server anymore.
I am using Windows 7 Pro. I have set Proxy Server but only for “http” and “https”. Now when I run the cmd with elevated privileges, and run the command “netsh winhttp show proxy” it says, “Direct access “. Why is it like that, and how to see these settings through the command line? Thanks.
Thanks a lot!
Awesome write-up. Thank you Walker!