Gilad
Gilad

Reputation: 6595

Adding Installation path into registry wix

This is my wix installer command in order to create registry key for my software:

<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" 
                                             Type="string" Value="" KeyPath="yes" />

How to create my installation path in the registry key?

Upvotes: 0

Views: 873

Answers (1)

user145400
user145400

Reputation: 1084

Assuming your directories are setup like this:

<Directory Id="ProgramFilesFolder">
  <Directory Id="INSTALLDIR" Name="MyProductName" />

If you want to store the installation path in registry you can use the value of that variable INSTALLDIR inside your RegistryValue element:

<RegistryValue Root="HKCU"
  Key="Software\[Manufacturer]\[ProductName]" 
  Type="string"
  Value="[INSTALLDIR]"
  KeyPath="yes"/>

Upvotes: 2

Related Questions