Solved

Disable the proxy server in IE

Posted on 2000-04-23
4
379 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

930 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

11 Experts available now in Live!

Get 1:1 Help Now