I have an example in C# using DTF at: http://blog.iswix.com/2008/05/how-dtf-is-going-to-help-me-become.html
http://stackoverflow.com/questions/12492769/wix-remove-old-program-folder-be fore-install I know your using C++ so you'll have to look at what the underlying function is for each class/method in DTF and then see what tricks WiX provides for creating records and what not. Then of course there's all the wonderful casting you have to do in C++. Eitherway, maybe it'll just validate the general flow and help you catch something thats missing. (like 3 vs 4 fields) ---------------------------------------- From: "Peter Shirtcliffe" <pshirtcli...@sdl.com> Sent: Thursday, September 20, 2012 5:55 AM To: "General discussion for Windows Installer XML toolset." <wix-users@lists.sourceforge.net> Subject: Re: [WiX-users] Populate a list box from a custom action Your call to wcaaddtemprecord looks ok. The only thing I can guess at is that you need to specify all 4 columns of the ListBox table, rather than just the 3 you have. The other difference from my code is that I also have MSIDBERROR insertError = MSIDBERROR_NOERROR; And I give &insertError as the 4th argument. -----Original Message----- From: Natalie Carr [mailto:natalie.c...@measuresoft.com] Sent: 20 September 2012 10:58 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Populate a list box from a custom action Hi I have a Custom Action in C++ that gets the Com ports of a machine and I need to get these into a listbox in my staller. I have the following but it is the wcaAddTempRecord is not working and I cannot find any good documentation on this. Thanks extern "C" UINT __stdcall GetDatascanPort(MSIHANDLE hInstall) { AssertSz(FALSE, "debug here"); DebugBreak(); HRESULT hr = S_OK; UINT er = ERROR_SUCCESS; HKEY keyHandle; DWORD i,openStatus,cb_value_buffer,cb_buffer,dwType; char value_buffer[100],buffer[10]; MSIHANDLE hTable = NULL; MSIHANDLE hColumns = NULL; hr = WcaInitialize(hInstall, "GetDatascanPort"); ExitOnFailure(hr, "Failed to initialize"); WcaLog(LOGMSG_STANDARD, "Initialized."); if (RegCreateKeyEx( HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, "", REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE, default_sa(), &keyHandle, &openStatus ) == ERROR_SUCCESS ) { for (i=0;;i++) { cb_value_buffer = sizeof(value_buffer); cb_buffer = sizeof(buffer); if (RegEnumValue(keyHandle, i, value_buffer, &cb_value_buffer, NULL, &dwType, (unsigned char *) buffer, &cb_buffer) != ERROR_SUCCESS) break; if (dwType != REG_SZ || strlen(buffer) > 6) continue; } hr = WcaAddTempRecord(&hTable, &hColumns, L"ListBox", NULL, 0, 3, L"COMPORT", 1, L"Item 1"); RegCloseKey(keyHandle); if (hTable) MsiCloseHandle(hTable); if (hColumns) MsiCloseHandle(hColumns); return WcaFinalize(hr); } LExit: er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; return WcaFinalize(er); } My list box is, it has a sample list item: <Control Type="ListBox" Property="COMPORT" Id="Comport" Width="80" Height="40" X="80" Y="165"> <ListBox Property="COMPORT"> <ListItem Text="COM 3" Value="0"/> </ListBox> Kind Regards, Natalie Carr ---------------------------------------------------------------------------- - - Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ---------------------------------------------------------------------------- -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users