我正在創建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是的。我的應用程序是一個服務安裝程序。 –