R – Wix: How to set the property after CustomAction? Do I need CustomAction

custom-actionregistrywixwix3

I want to install a plugin with the Wix Setup. On the computer, there could be installed more versions of the application, so the user has to decide, which version should be used.
The applications are written in the registry in this way:

HKLM\Software\Company\Application\Version ….

That meas that the key HKLM\Software\Company\Application has no direct values and i have to
ask for its children what is done in C# with: RegistryKey.GetSubKeyNames.

QUESTION 1:

Is there any way to read these subkey names without CustomAction?

I hadn't found that possibility and that's why I've done it with Custom action.

QUESTION 2:

But how can I set the results found in the CustomAction as property in wxs? Is it possible?

If you can help me, I would be very happy…

Bye, Ivo

Best Solution

  1. You can't enumerate keys using windows install (or Wix) you can only search a direct key path.
  2. You can write pretty simple custom action (using DTF) that will do this special search.
  3. Here is a sample that demonstrate a full use of DTF (Using a Custom Action to list available web sites on IIS) it shows how to pass data from the custom action back to the installer and how to display the data on using UI.
Related Question