Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Determining proxy server settings in IE
Old
  (#1)
Dan
Guest
 
Posts: n/a
Default Determining proxy server settings in IE - 06-04-2007, 08:54 AM

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 (***uming
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!


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Determining proxy server settings in IE
Old
  (#2)
Raoul Watson
Guest
 
Posts: n/a
Default Re: Determining proxy server settings in IE - 06-04-2007, 08:54 AM


"Dan" <EMAIL REMOVED> wrote in message
news:X4qdnUBT0s5YXlOiRVn-EMAIL REMOVED...
> 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

(***uming
> 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.




   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Determining proxy server settings in IE
Old
  (#3)
Dan
Guest
 
Posts: n/a
Default Re: Determining proxy server settings in IE - 06-04-2007, 08:54 AM

"Raoul Watson" <EMAIL REMOVED> wrote in message
news:PAaAb.342$EMAIL REMOVED...
>
> "Dan" <EMAIL REMOVED> wrote in message
> news:X4qdnUBT0s5YXlOiRVn-EMAIL REMOVED...
> > 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

> (***uming
> > 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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Determining proxy server settings in IE
Old
  (#4)
Raoul Watson
Guest
 
Posts: n/a
Default Re: Determining proxy server settings in IE - 06-04-2007, 08:54 AM


"Dan" <EMAIL REMOVED> wrote in message
news:8oKdnYVAO-aS5kyiRVn-EMAIL REMOVED...

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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Determining proxy server settings in IE
Old
  (#5)
Dan
Guest
 
Posts: n/a
Default Re: Determining proxy server settings in IE - 06-04-2007, 08:54 AM

"Raoul Watson" <EMAIL REMOVED> wrote in message
news:J9mAb.471$EMAIL REMOVED...
>
> "Dan" <EMAIL REMOVED> wrote in message
> news:8oKdnYVAO-aS5kyiRVn-EMAIL REMOVED...
>
> > 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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Determining proxy server settings in IE
Old
  (#6)
Raoul Watson
Guest
 
Posts: n/a
Default Re: Determining proxy server settings in IE - 06-04-2007, 08:55 AM


"Dan" <EMAIL REMOVED> wrote in message
news:Zt2dnTfdyvxGj0-iRVn-EMAIL REMOVED...

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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Determining proxy server settings in IE
Old
  (#7)
Dan
Guest
 
Posts: n/a
Default Re: Determining proxy server settings in IE - 06-04-2007, 08:55 AM

"Raoul Watson" <EMAIL REMOVED> wrote in message
news:vBpAb.42$EMAIL REMOVED...
>
> "Dan" <EMAIL REMOVED> wrote in message
> news:Zt2dnTfdyvxGj0-iRVn-EMAIL REMOVED...
>
> > 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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Determining proxy server settings in IE
Old
  (#8)
Raoul Watson
Guest
 
Posts: n/a
Default Re: Determining proxy server settings in IE - 06-04-2007, 08:55 AM

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

"Dan" <EMAIL REMOVED> wrote in message
news:XpOdnUcJA_utWk-iRVn-EMAIL REMOVED...
> Did you miss-type the location in your earlier post or is this a

difference
> in our systems?
>
> Thanks,
> Dan
>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top