469,366 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

Determining proxy server settings in IE

Dan
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!
Jul 17 '05 #1
7 11966

"Dan" <Da*@NoSpam.com> wrote in message
news:X4********************@comcast.com...
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.

Actually you could just check a registry key located at two locations, the
machine default and the user setting:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet\ProxySe
rver

HKEY_USERS\.Default\Software\Microsoft\Windows\Cur rentVersion\Internet
Settings\ProxyServer

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

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.


Jul 17 '05 #2
Dan
"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message
news:PA***************@nwrdny02.gnilink.net...

"Dan" <Da*@NoSpam.com> wrote in message
news:X4********************@comcast.com...
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.

Actually you could just check a registry key located at two locations, the
machine default and the user setting:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet\ProxySe rver

HKEY_USERS\.Default\Software\Microsoft\Windows\Cur rentVersion\Internet
Settings\ProxyServer

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

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.


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
Jul 17 '05 #3

"Dan" <Da*@NoSpam.com> wrote in message
news:8o********************@comcast.com...
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?


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.
Jul 17 '05 #4
Dan
"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message
news:J9***************@nwrdny02.gnilink.net...

"Dan" <Da*@NoSpam.com> wrote in message
news:8o********************@comcast.com...
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?


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.


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 misunderstanding you...

Thanks,
Dan
Jul 17 '05 #5

"Dan" <Da*@NoSpam.com> wrote in message
news:Zt********************@comcast.com...
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 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.
Jul 17 '05 #6
Dan
"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message
news:vB*************@nwrdny03.gnilink.net...

"Dan" <Da*@NoSpam.com> wrote in message
news:Zt********************@comcast.com...
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 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.

I just checked on my XP Home machine and the location in my registry is:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings\ProxyServer
not
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet\ProxySe
rver

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

Thanks,
Dan
Jul 17 '05 #7
Must've wrap the line it's Internet Settings.

"Dan" <Da*@NoSpam.com> wrote in message
news:Xp********************@comcast.com...
Did you miss-type the location in your earlier post or is this a difference in our systems?

Thanks,
Dan

Jul 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Robb Gilmore | last post: by
reply views Thread by PeterJ | last post: by
3 posts views Thread by Codex Twin | last post: by
1 post views Thread by OlaPihl | last post: by
2 posts views Thread by =?Utf-8?B?TGFycnlLdXBlcm1hbg==?= | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.