0
votes

I met a problem while adding entered by user path to registry.

Here are important parts of wix code.

Property declaration:

<Property Id="PathProp">C:\</Property>

Directory declaration:

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="PathProp" Name="Name">
  </Directory>
</Directory>

Registry block:

<RegistryKey Root="HKLM" Key="SOFTWARE\Path\To\Key" Action="createAndRemoveOnUninstall">
  <RegistryValue Name="UserSetPath" Value="[PathProp]" Type="string" />
</RegistryKey>

I have the dialog which pulls PathProp from user and I want entered value be in registry. But I see the default value ("C:\"). Is it possible to register exactly what user entered?

1

1 Answers

0
votes

I had a experience in past, where installer properties set in UI mode were destroyed in Execute mode.

Reason: Properties were not set "secure". Wix properties have attribute secure="true". Use It.

Also if possible share the installer log with us,so we can have a look at it.

You can get log by using this command:

 <InstallerPath>/<InstallerName>.msi /l*v <LogPath>/InstallLog.txt