cpinstall
Posts: 19
Joined: Thu Jun 08, 2006 4:00 pm

Detecting a proxy that requires authentication

Is there a way to detect that a proxy server requires authentication? I know that you can look in:

Code: Select all

HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings
to find information about whether they have a proxy server specified. But there is nothing there that indicates the proxy server requires authentication.

Is there a way of finding this out?

Also, if there is no easy way to get this information, I will create a separate command line .exe file that will detect the proxy server and check if it requires authentication. How do I use this .exe as a Custom Action and get the .exe to pass information back to the installer? Can I read the return code or the console output of the .exe back to the installer? And how do I stored the information coming back as a Property?

Note: I want to eventually show a dialog box during the installation based on the result of the .exe.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

You need to write your own custom action (DLL) to achieve that. You cannot obtain the return code of the custom action, it is used only internally be Windows Installer. Here are the custom action return codes:
http://msdn2.microsoft.com/en-us/library/aa368072.aspx

You cannot obtain the handle to the MSI Database in a EXE CA so my suggestion is to use a DLL CA. To set the value of a property you can use MsiSetProperty function:
http://msdn2.microsoft.com/en-us/library/aa370391.aspx

To show a message box you can use MsiProcessMessage function:
http://msdn2.microsoft.com/en-us/library/aa371614.aspx

Hope this helps.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”