473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 12220

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: harry | last post by:
Hi, I have a program that runs on multiple client pc's. Occasionally one or more of those pc's use VPN to connect to another corporate network. When using VPN they need to set proxy server in...
3
by: Robb Gilmore | last post by:
posting this again as : rgilmore@newsgroup.nospam We have a C# .NET app which runs as a service. It posts data to a server using HttpWebrequest. According to the docs I 've read, it should use...
0
by: PeterJ | last post by:
I created some web pages in Visual Studio 2003 in VB and sent them to another fellow to be rolled up into an application. This was sent back to me and I could not open the whole application. Now...
3
by: Codex Twin | last post by:
Hello apologies if this is the wrong newsgroup to be sending this to. Basically, I have an ASP.NET application that I am trying to force to use a proxy server settings. This can be done by...
9
by: Codex Twin | last post by:
I am re-sending this in the hope that it might illicit a response. I have a corporate client who forces their workstations to get the proxy server details using an automatic proxy discovery script....
2
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me...
0
by: Maxx57 | last post by:
C# VS.Net 1.1 (2003) - trouble with using IE proxy server settings I've got a program that detects if it can connect to a webservice. It sends a System.Net.WebRequest and then checks the...
1
by: OlaPihl | last post by:
Hi, How can I by code enable and disable "Bypass proxy server for local adresses" in Internet Explorer / Tools / Internet Options / Connections / LAN Settings. I have made a program (VB.Net)...
2
by: =?Utf-8?B?TGFycnlLdXBlcm1hbg==?= | last post by:
Our WebDev team seems to have found a problem that exposes a bug in .NET 2.0. This problem can be shown when trying to access a WebService using SSL and through a proxy server after using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.