Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot create registry key value with WiX installer

The below component does everything as expected, but fails to write the last registry key value. I get no errors.

<Component Id="ProgramMenuDir" Guid="68977683-3F36-45EF-9FF4-7B9461A42D06">
<RemoveFolder Id="ProgramMenuDir" On="uninstall" />
<RegistryKey Root="HKLM" Key="Software\Wow6432Node\[Manufacturer]\[ProductName]" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
    <RegistryValue Type="string" Name="APIUrl" Value="http://api.blah/" KeyPath="yes" />
    <RegistryValue Type="string" Name="Token" Value="blah" />
</RegistryKey>
<RegistryKey Root="HKLM" Key="Software\Wow6432Node\[Manufacturer]\[ProductName]\Tokens" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" />
<RegistryKey Root="HKLM" Key="Software\Wow6432Node\[Manufacturer]\[ProductName]\Tokens\WOvN+Lac+d3wRtY0uBUsAeHTYg4x7j2/NWpftWv/16qaOz3J6TpDQmvjUpQmoCWPSFdMpbrcpi4rJd56aBKkkvSR54RsS5xueaYfPgk1QmQ=" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" />
<RegistryValue Root="HKLM" Action="write" Key="Software\Microsoft\Windows\CurrentVersion\Run" Name="[ProductName]" Value="blah" Type="string" />
</Component>

Why no write, yet no errors?

like image 276
Evil August Avatar asked Jan 28 '14 21:01

Evil August


1 Answers

Are you just looking in the wrong place, if this is a 32 bit installer then you need to check the following location - HKLM\Software\Wow6432Node\Microsoft

Remember that these are the equivalent nodes depending on your install architecture:

32bit installer on 64bit machine:

HKLM\Software\Wow6432Node\Microsoft

32bit installer on 32bit machine or 64bit installer on 64bit machine:

HKLM\Software\Microsoft
like image 196
David Martin Avatar answered Oct 01 '22 17:10

David Martin