• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Refresh LAN Settings in IE

I wrote a small app to turn on and off the proxy settings in Internet Explorer.
How do I refresh the settings programmatically without having to close and reopen IE?

Thanks
0
cscherrey
Asked:
cscherrey
  • 2
1 Solution
 
geobulCommented:
Hi,

Try this function:

uses WinInet;

procedure IE_Reread_Registry_Settings;
var
  HInet: HINTERNET;
begin
  hInet := InternetOpen(PChar('ProgramName'), INTERNET_OPEN_TYPE_DIRECT,
    nil, nil, INTERNET_FLAG_OFFLINE);
  try
    if hInet <> nil then
      InternetSetOption(hInet, INTERNET_OPTION_SETTINGS_CHANGED, nil, 0);
  finally
    InternetCloseHandle(hInet);
  end;
end;

Regards, Geo
0
 
cscherreyAuthor Commented:
Perfect
Thanks.
0
 
geobulCommented:
You are welcome :-)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now