Determining proxy server settings in IE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan

    Determining proxy server settings in IE

    I have an app that communicates over the Internet through API calls to the
    wininet DLL. I can determine whether IE has a proxy server configured (not
    the setting, just whether it uses a proxy server - yes or no) and I can
    specify the proxy server settings I want to use. But I can't determine what
    the server and port settings are that are already configured in IE (assuming
    there are any). Does anyone know a way to get these settings? I would
    think there would be an API call for this but can't find one in the wininet
    DLL. This needs to work on all 32 bit versions of Windows from 95 on up.

    Thanks!


  • Raoul Watson

    #2
    Re: Determining proxy server settings in IE


    "Dan" <Dan@NoSpam.com > wrote in message
    news:X4qdnUBT0s 5YXlOiRVn-ig@comcast.com. ..[color=blue]
    > I have an app that communicates over the Internet through API calls to the
    > wininet DLL. I can determine whether IE has a proxy server configured[/color]
    (not[color=blue]
    > the setting, just whether it uses a proxy server - yes or no) and I can
    > specify the proxy server settings I want to use. But I can't determine[/color]
    what[color=blue]
    > the server and port settings are that are already configured in IE[/color]
    (assuming[color=blue]
    > there are any). Does anyone know a way to get these settings? I would
    > think there would be an API call for this but can't find one in the[/color]
    wininet[color=blue]
    > DLL. This needs to work on all 32 bit versions of Windows from 95 on up.
    >[/color]
    Actually you could just check a registry key located at two locations, the
    machine default and the user setting:

    HKEY_CURRENT_US ER\Software\Mic rosoft\Windows\ CurrentVersion\ Internet\ProxyS e
    rver

    HKEY_USERS\.Def ault\Software\M icrosoft\Window s\CurrentVersio n\Internet
    Settings\ProxyS erver

    A sample value might be:
    "ProxyServer"=" 142.119.1.82:80 80"

    If these keys are present and it has a value, you can be 99.99% sure that
    the proxy server is set. To change it, simply write to the registry (keeping
    in mind the user needs admin rights for the HKLM.




    Comment

    • Dan

      #3
      Re: Determining proxy server settings in IE

      "Raoul Watson" <WatsonR@Intell igenCIA.com> wrote in message
      news:PAaAb.342$ vg4.338@nwrdny0 2.gnilink.net.. .[color=blue]
      >
      > "Dan" <Dan@NoSpam.com > wrote in message
      > news:X4qdnUBT0s 5YXlOiRVn-ig@comcast.com. ..[color=green]
      > > I have an app that communicates over the Internet through API calls to[/color][/color]
      the[color=blue][color=green]
      > > wininet DLL. I can determine whether IE has a proxy server configured[/color]
      > (not[color=green]
      > > the setting, just whether it uses a proxy server - yes or no) and I can
      > > specify the proxy server settings I want to use. But I can't determine[/color]
      > what[color=green]
      > > the server and port settings are that are already configured in IE[/color]
      > (assuming[color=green]
      > > there are any). Does anyone know a way to get these settings? I would
      > > think there would be an API call for this but can't find one in the[/color]
      > wininet[color=green]
      > > DLL. This needs to work on all 32 bit versions of Windows from 95 on[/color][/color]
      up.[color=blue][color=green]
      > >[/color]
      > Actually you could just check a registry key located at two locations, the
      > machine default and the user setting:
      >
      >[/color]
      HKEY_CURRENT_US ER\Software\Mic rosoft\Windows\ CurrentVersion\ Internet\ProxyS e[color=blue]
      > rver
      >
      > HKEY_USERS\.Def ault\Software\M icrosoft\Window s\CurrentVersio n\Internet
      > Settings\ProxyS erver
      >
      > A sample value might be:
      > "ProxyServer"=" 142.119.1.82:80 80"
      >
      > If these keys are present and it has a value, you can be 99.99% sure that
      > the proxy server is set. To change it, simply write to the registry[/color]
      (keeping[color=blue]
      > in mind the user needs admin rights for the HKLM.
      >[/color]

      I thought of just reading the registry but didn't trust there was one place
      to look that will always give me the correct answer. Will these locations
      be correct for all versions of IE on all versions of Windows?

      Thanks,
      Dan


      Comment

      • Raoul Watson

        #4
        Re: Determining proxy server settings in IE


        "Dan" <Dan@NoSpam.com > wrote in message
        news:8oKdnYVAO-aS5kyiRVn-iw@comcast.com. ..
        [color=blue]
        > I thought of just reading the registry but didn't trust there was one[/color]
        place[color=blue]
        > to look that will always give me the correct answer. Will these locations
        > be correct for all versions of IE on all versions of Windows?
        >[/color]

        Well.. not below 4.0, but I have these settings pushed to hundreds of my
        workstations consisting of NT, 2K, XP and some left over 95's.


        Comment

        • Dan

          #5
          Re: Determining proxy server settings in IE

          "Raoul Watson" <WatsonR@Intell igenCIA.com> wrote in message
          news:J9mAb.471$ vg4.291@nwrdny0 2.gnilink.net.. .[color=blue]
          >
          > "Dan" <Dan@NoSpam.com > wrote in message
          > news:8oKdnYVAO-aS5kyiRVn-iw@comcast.com. ..
          >[color=green]
          > > I thought of just reading the registry but didn't trust there was one[/color]
          > place[color=green]
          > > to look that will always give me the correct answer. Will these[/color][/color]
          locations[color=blue][color=green]
          > > be correct for all versions of IE on all versions of Windows?
          > >[/color]
          >
          > Well.. not below 4.0, but I have these settings pushed to hundreds of my
          > workstations consisting of NT, 2K, XP and some left over 95's.
          >[/color]

          When you say you have these settings "pushed to" hundreds of workstations do
          you mean you put the settings there? That isn't much help for an
          application that needs to be able to consistently find the settings
          regardless of what version of Windows the user has. This is for a desktop
          app I'm selling so the program needs to be able to find the settings
          reliably.

          I may just be misunderstandin g you...

          Thanks,
          Dan


          Comment

          • Raoul Watson

            #6
            Re: Determining proxy server settings in IE


            "Dan" <Dan@NoSpam.com > wrote in message
            news:Zt2dnTfdyv xGj0-iRVn-gQ@comcast.com. ..
            [color=blue]
            > When you say you have these settings "pushed to" hundreds of workstations[/color]
            do[color=blue]
            > you mean you put the settings there? That isn't much help for an
            > application that needs to be able to consistently find the settings
            > regardless of what version of Windows the user has. This is for a desktop
            > app I'm selling so the program needs to be able to find the settings
            > reliably.[/color]

            I have 600 workstations of numerous OS and as each user logs in, I use
            ZENworks, application launcher to push these registry settings to ensure
            that all my users are using the correct proxy server.

            All I was trying to relay to you is that with numerous OS and Explorer
            version, these settings work. Which means that "that is the registry setting
            that is used by IE Explorer to get the proxy server".

            So if you have an application that check these registry setting, then
            technically you would consistently get the proxy server since IE doesn't
            look at ANY OTHER setting.


            Comment

            • Dan

              #7
              Re: Determining proxy server settings in IE

              "Raoul Watson" <WatsonR@Intell igenCIA.com> wrote in message
              news:vBpAb.42$i y6.10@nwrdny03. gnilink.net...[color=blue]
              >
              > "Dan" <Dan@NoSpam.com > wrote in message
              > news:Zt2dnTfdyv xGj0-iRVn-gQ@comcast.com. ..
              >[color=green]
              > > When you say you have these settings "pushed to" hundreds of[/color][/color]
              workstations[color=blue]
              > do[color=green]
              > > you mean you put the settings there? That isn't much help for an
              > > application that needs to be able to consistently find the settings
              > > regardless of what version of Windows the user has. This is for a[/color][/color]
              desktop[color=blue][color=green]
              > > app I'm selling so the program needs to be able to find the settings
              > > reliably.[/color]
              >
              > I have 600 workstations of numerous OS and as each user logs in, I use
              > ZENworks, application launcher to push these registry settings to ensure
              > that all my users are using the correct proxy server.
              >
              > All I was trying to relay to you is that with numerous OS and Explorer
              > version, these settings work. Which means that "that is the registry[/color]
              setting[color=blue]
              > that is used by IE Explorer to get the proxy server".
              >
              > So if you have an application that check these registry setting, then
              > technically you would consistently get the proxy server since IE doesn't
              > look at ANY OTHER setting.
              >
              >[/color]
              I just checked on my XP Home machine and the location in my registry is:
              HKEY_CURRENT_US ER\Software\Mic rosoft\Windows\ CurrentVersion\ Internet
              Settings\ProxyS erver
              not
              HKEY_CURRENT_US ER\Software\Mic rosoft\Windows\ CurrentVersion\ Internet\ProxyS e
              rver

              Did you miss-type the location in your earlier post or is this a difference
              in our systems?

              Thanks,
              Dan


              Comment

              • Raoul Watson

                #8
                Re: Determining proxy server settings in IE

                Must've wrap the line it's Internet Settings.

                "Dan" <Dan@NoSpam.com > wrote in message
                news:XpOdnUcJA_ utWk-iRVn-hQ@comcast.com. ..[color=blue]
                > Did you miss-type the location in your earlier post or is this a[/color]
                difference[color=blue]
                > in our systems?
                >
                > Thanks,
                > Dan
                >
                >[/color]


                Comment

                Working...