Hi Ondrej,
You can populate a Combobox or Listbox control from an Immediate Custom Action. This means that you can use only a C++ DLL Custom Action, not a .NET CA.
Basically, the steps are the following:
1. Construct the query string (INSERT INTO `ComboBox` ...):
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx
2. Obtain the handle for the active database using
MsiGetActiveDatabase:
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx
3. Create a view object using
MsiDatabaseOpenView, specifying the query string you have constructed previously:
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx
4. Execute the SQL query on the view object using the
MsiViewExecute function:
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx
5. Close any open handles using
MsiCloseHandle if you are not using the PMSIHANDLE wrapper class.
The following forum threads provide VBScript Custom Actions for achieving what you want and might prove useful:
http://www.advancedinstaller.com/forums ... php?t=4636
http://www.advancedinstaller.com/forums ... php?t=1768
In a future AI version we shall consider adding predefined Custom Actions that insert items in a Combobox or Listbox control.
Hope this helps.
Regards,
Ionut
FOLLOW US
Get the latest news in Application Packaging