Solved

Disable the proxy server in IE

Posted on 2000-04-23
4
377 Views
Last Modified: 2010-04-04
Hi Expert
How I can disable/enable the proxy server in IE ?
Thanks
Andrea.
0
Comment
Question by:borgo
  • 2
4 Comments
 
LVL 2

Expert Comment

by:hhamster
ID: 2742073
As 1st, you're in the wrong section.

And 2nd, in IE click Tools -> Internet options (in version 5) or View -> Options (I think so, in version 4 of IE). On the Connections tab you have LAN Settings. Uncheck there 'Use a proxy server'. Thats all.
0
 
LVL 3

Accepted Solution

by:
Mathias earned 20 total points
ID: 2743256
To change the proxy settings you must edit the registry.
I own IE 5.0 and change the proxy settings with a small programm.

Here is my code. You need two Edit boxes and two Checkboxes.
My form looks like

ProxyStr: [      ]
ProxyPort: [      ]

[x] Enable Proxy
[x] Override Proxy

If you have further questions, e.g. proxy settings in other browsers,
contact me.

{ --- cut --- }

unit proxyp;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Registry;

type
  TForm1 = class(TForm)
    ProxyStr: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    ProxyPort: TEdit;
    enableproxy: TCheckBox;
    overproxy: TCheckBox;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

const OverProxy_Reg: string =
       '.Default\Software\Microsoft\Windows\CurrentVersion\Internet Settings';

var SaveOverProxy: String;

procedure TForm1.FormCreate(Sender: TObject);
var R: TRegistry;
    S: String;
begin
  R:=TRegistry.Create;
  with R do
  begin
    RootKey:=HKEY_USERS;
    if OpenKey(OverProxy_Reg, False) then
    begin
      {Enable/Disable}
      if ReadInteger('ProxyEnable') <> 0 then
        EnableProxy.Checked:=True;
      SaveOverProxy:=ReadString('ProxyOverride');
      if SaveOverProxy <> '' then
        OverProxy.Checked:=True
      else
        SaveOverProxy:='<local>';
      S:=ReadString('ProxyServer');
      if pos(':', S) = 0 then
      begin
        ProxyStr.Text:=S;
        ProxyPort.Text:='';
      end
      else
      begin
        ProxyStr.Text:=Copy(S, 1, pos(':', S)-1);
        ProxyPort.Text:=Copy(S, pos(':', S)+1, length(S));
      end;
    end;
  end;
  R.Free;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
var R: TRegistry;
    S: String;
begin
  R:=TRegistry.Create;
  with R do
  begin
    RootKey:=HKEY_USERS;
    if OpenKey(OverProxy_Reg, False) then
    begin
      {Enable/Disable}
      WriteInteger('ProxyEnable', Ord(EnableProxy.Checked));
      if OverProxy.Checked then
        WriteString('ProxyOverride', SaveOverProxy)
      else
        WriteString('ProxyOverride', '');
      S:=ProxyStr.text+':'+ProxyPort.Text;
      WriteString('ProxyServer', S);
    end;
  end;
  R.Free;
end;

end.
0
 

Author Comment

by:borgo
ID: 2743844
Thank you very much TDS.
Does it work also with IE running or I need to close and reopen the browser ?
Does I need to reboot my pc.

Have a nice day

Andrea.
0
 
LVL 3

Expert Comment

by:Mathias
ID: 2744228
You don't need to reboot your PC, but you must restart the browser. I tried it with the opened browser. The answer was "Couldn't find the proxy server".
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Firewall issues 6 85
Strange message in Delphi 10 Seattle 1 465
IExtractImage Delphi 14 167
How to use Hashing sha1 in Delphi 2010 4 163
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now