Wix v3.7-写入注册表值时出错 [英] Wix v3.7 - Error Writing Registry Values
问题描述
我正在使用wix创建安装程序,但写入注册表时遇到问题.这是我的RegistryValue元素:
I'm creating an installer using wix and I'm having problems writing to the registry. Here is my RegistryValue element:
<Component Id="CMP_odbcreg" Guid="{115B002E-F4C9-48CD-8E1C-E8803B16AE69}">
<RegistryValue Id="rg_psql"
Root="HKLM"
Key="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers"
Name="PostgreSQL"
Value="Installed"
Type="string"
KeyPath="yes"
Action="write"/>
</Component>
没有任何内容写入注册表.该组件位于我的主要安装功能中,因此应始终将其写入注册表.我查看了我的日志文件,发现了这一点:
Nothing is being written to the registry. This component is in my main install feature, so it should always write to the registry. I looked at my log file and found this:
MSI (s) (60:1C) [00:00:07:080]: Doing action: WriteRegistryValues
MSI (s) (60:1C) [00:00:07:080]: Note: 1: 2205 2: 3: ActionText
Action 0:00:07: WriteRegistryValues. Writing system registry values
Action start 0:00:07: WriteRegistryValues.
WriteRegistryValues: Key: Writing system registry values, Name: , Value:
Action ended 0:00:07: WriteRegistryValues. Return value 1.
我不知道我是否在解释这种权利,但似乎根本没有任何内容写入注册表.我还使用热量生成了其他一些组件,这些组件包含除CMP_odbcreg外还应执行的RegistryValue元素.我检查了Windows注册表并确认没有值被写入.
I don't know if I'm interpreting that right, but it seems like nothing is being written to the registry at all. I have several other components generated using heat that contain RegistryValue elements which should have been executed in addition to CMP_odbcreg. I checked my Windows Registry and confirmed that no values are being written.
我有一个wix手册,其中包含一个写入注册表的示例.我尝试将其复制并粘贴到安装程序中,然后将其添加到主要安装功能中.那也不起作用
I have a wix manual which contains an example of writing to the registry. I tried copying and pasting it into my installer and adding it to the main install feature. That didn't work either
请帮助!
推荐答案
Since nowadays 64 bit systems are widely spread I recommend a small lecture on Registry Redirection, I am sure you will find the info useful for the future. This applies to any application accessing the registry, not just to an installer.
In your case, if you need to disable the redirection for the installer, you can have a look at this SO thread.
这篇关于Wix v3.7-写入注册表值时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!