简体   繁体   English

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

[英]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? 为什么不写,但没有错误?

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 你只是在错误的地方看,如果这是一个32位安装程序,那么你需要检查以下位置 - HKLM \\ Software \\ Wow6432Node \\ Microsoft

Remember that these are the equivalent nodes depending on your install architecture: 请记住,这些是等效节点,具体取决于您的安装架构:

32bit installer on 64bit machine: 64位机器上的32位安装程序:

HKLM\Software\Wow6432Node\Microsoft

32bit installer on 32bit machine or 64bit installer on 64bit machine: 32位机器上的32位安装程序或64位机器上的64位安装程序:

HKLM\Software\Microsoft

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM