无法使用WiX安装程序创建注册表项值

时间:2014-01-28 21:27:10

标签: wix installer install

以下组件按预期执行所有操作,但无法写入最后一个注册表项值。我没有错。

<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>

为什么没有写,但没有错误?

1 个答案:

答案 0 :(得分:12)

您是否只是找错了地方,如果这是32位安装程序,那么您需要检查以下位置 - HKLM \ Software \ Wow6432Node \ Microsoft

请记住,这些是等效节点,具体取决于您的安装架构:

64位计算机上的32位安装程序:

HKLM\Software\Wow6432Node\Microsoft

32位计算机上的32位安装程序或64位计算机上的64位安装程序:

HKLM\Software\Microsoft