PDA

View Full Version : Detecting Proxy settings



cchian
08-29-2002, 04:15 PM
Is there a way to detect the proxy settings address and port number?

Derek
08-29-2002, 07:06 PM
Hi - sure (without looking) there's a GetProxySettings somewhere!

Lorne
08-30-2002, 09:51 AM
Use a "Dialog - Get Proxy Settings" action to get the info. /ubbthreads/images/icons/smile.gif

cchian
08-30-2002, 10:12 AM
I can get the dialog to pop-up, but the values are blank as if asking to manually enter the info. I must be doing something wrong.

Lorne
08-30-2002, 10:25 AM
Exactly. The dialog is meant to prompt the user for those settings.

If you want to get them automatically, you can try getting the information from the Registry (you might be able to gather it from IE's connection settings?), but I don't believe it will always be available that way.

cchian
08-30-2002, 10:48 AM
Good idea Lorne, I found the registry values I wanted in the following places:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet Settings\ProxyServer

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

Do you know which one should I use?

Thanks

Lorne
08-30-2002, 10:50 AM
The first one.

The .Default key holds default settings for new users, and isn't as likely to be configured properly. /ubbthreads/images/icons/smile.gif