Ability to select data from an external web service - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

koivu
Posts: 3
Joined: Tue Apr 01, 2008 3:36 pm

Ability to select data from an external web service

I'd like to prompt the user for their account number in a custom dialog, then use that account number to select their current account details from an external web page or web service. Does Advanced Installer support this sort of lookup during the dialog flow to help pre-populate information? I was trying to see if I could do this using a Custom Action with a VBS script to do the lookup, but I'm not quite sure where to start.

Thanks,
James
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This can be done by using a custom action and a DoAction Control Event. Here are the steps:
- create a custom action which connects to the web page and sets the properties of the controls you want to populate (you can use a VBScript or C++ DLL custom action)
- we have an example for a C++ DLL custom action which can be used as a starting point:
http://www.advancedinstaller.com/user-g ... n-dll.html
- in a C++ DLL custom action you can set installer properties by using the MsiSetProperty function:
http://msdn2.microsoft.com/en-us/library/aa370391.aspx
- schedule the custom action under the "UI Custom Actions" sequence in the "Custom Actions" page
- go to the "Dialogs" page and select the "Next" button on your custom dialog
- in the Published Events tab add this control event:

Code: Select all

DoAction     myaction.dll     AI_INSTALL
- where "myaction.dll" is the name of your custom action (for this example it's a DLL custom action)

After this custom actions runs, the properties of the controls you want populated are set, therefore the controls will have the default value you want.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”