HKEY_CURRENT_USER\Software\Microsoft\windows\CurrentVersion\Internet Settings\ProxyServer

解决方案 »

  1.   

    procedure SetIEProxy;
    var
      ARegistry : TRegistry;
    begin
      ARegistry := TRegistry.Create;
      with ARegistry do
      begin
        RootKey := HKEY_CURRENT_USER;
        if not OpenKey('\Software\Microsoft\windows\CurrentVersion\Internet Settings', False ) then
        OpenKey( '\Software\Microsoft\windows\CurrentVersion\Internet Settings', True );
        WriteString('ProxyServer ', proxyname);
        CloseKey;    {关闭主键,同时将信息写入注册表}
        Destroy;    {释放内存  }
      end;
    end;