Search code examples
wixwix3

Store value of ConfigurableDirectory in registry


Our installer allows the users to select where they want to install certain files, but we need to have a registry entry that points to that location. I am using the ConfigurableDirectory option of the Feature to do that. How can I get the directory that the user selected so I can write it to the registry?


Solution

  • I missed that "bracketed names will be looked up and if found, replaced with their actual value." in the Wix tutorial

    So I was able to do the following.

        <Component Id="DataFileRegEntry" Guid="" >
          <RegistryKey Root="HKCU" Key="keypath" >
            <RegistryValue Type="string" Name="Calibration" Value="[FILES]"  />
          </RegistryKey>
        </Component>