我正在创建x64 msi。我有一些注册表值要设置。在Wix中,我使用下面的代码。注册表项在Wix中无法正常工作
<Component Id="RegistryEntries1" Guid="{GUID1}" Win64="yes">
<RegistryKey Root="HKLM"
Key="Software\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{FF.....}"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="SomeName" KeyPath="yes"/>
</RegistryKey>
</Component>
<Component Id="RegistryEntries2" Guid="{GUID2}" Win64="yes">
<RegistryKey Root="HKCR"
Key="CLSID\{FF.....}"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="SomeName" KeyPath="yes"/>
</RegistryKey>
</Component>
<Component Id="RegistryEntries3" Guid="{GUID3}" Win64="yes">
<RegistryKey Root="HKCR"
Key="CLSID\{{FF.....}\InprocServer32"
Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="SomeName.dll" KeyPath="no"/>
<RegistryValue Type="string" Name="ThreadingModel" Value="Apartment" KeyPath="yes"/>
</RegistryKey>
</Component>
这些值在注册表中设置,但我的应用程序无法正常工作。
当我使用reg文件设置注册表值时,应用程序正常工作。
而且我SomeName.dll是在System32中
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{FF.....}]
@="SomeName"
[HKEY_CLASSES_ROOT\CLSID\{FF.....}]
@="SomeName"
[HKEY_CLASSES_ROOT\CLSID\{FF.....}\InprocServer32]
@="SomeName.dll"
"ThreadingModel"="Apartment"
有没有在我的维克斯代码中的任何问题。
您的应用程序可能作为服务运行吗?或者作为另一个帐户运行? – PhilDW
@PhilDW是的。我的应用程序是一个服务安装程序。 –