簡體   English   中英

x64 Word 2010使用WiX添加注冊

[英]x64 Word 2010 Add In registration using WiX

我正在使用WiX部署Word添加,關於x84目標平台(至少Office安裝必須是x86,從來沒有使用過哪個OS平台)一切正常,我的COM Interop注冊Word Add In工作和添加自動啟動我第一次啟動單詞后我安裝了添加。

我正在注冊注冊表中的注冊內容(從heat.exe的輸出中刪除)

我創建了一個中間文件,幫助我使用這個加熱命令進行COM Interop注冊:

"C:\Program Files\Windows Installer XML v3.5\bin\heat.exe" file MyAddin.dll -ag -template fragment -out MyAddin.wxs 

interesst的輸出看起來像:(我知道使用這種方式使用RegistryValue已被棄用)

<Class Id="{10BC65F1-32C0-3ED4-98A0-17661A8C4455}" Context="InprocServer32" Description="MyAddin.MyAddinClass" ThreadingModel="both" ForeignServer="mscoree.dll">
    <ProgId Id="MyAddin.MyAddinClass" Description="MyAddin.MyAddinClass" />
</Class>
<File Id="filCC4172BEC1312562EDEF49648E45AE0D" KeyPath="yes" Source="..\MyAddin\bin\Debug\MyAddin.dll" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32\1.0.0.0" Name="Class" Value="MyAddin.MyAddinClass" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32\1.0.0.0" Name="Assembly" Value="MyAddin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32\1.0.0.0" Name="CodeBase" Value="file:///[#filCC4172BEC1312562EDEF49648E45AE0D]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32" Name="Class" Value="MyAddin.MyAddinClass" Type="string"Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32" Name="Assembly" Value="MyAddin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{10BC65F1-32C0-3ED4-98A0-17661A8C4455}\InprocServer32" Name="CodeBase" Value="file:///[#filCC4172BEC1312562EDEF49648E45AE0D]" Type="string" Action="write" />

包含此內容的組件將Win64Flag標記設置為yes。 因此我認為事情將被寫入注冊表的x64部分。 在此之前,我閱讀了關於注冊表反射的以下文章,告訴我:

例如,32位InprocServer32密鑰與64位應用程序無關,因此InprocServer32密鑰不會反映到64位注冊表視圖。

此外:

但是,64位應用程序可以使用32位LocalServer32密鑰並反映LocalServer32密鑰。

但我已經嘗試使用LocalServer32而不是InprocServer32,但這樣做,不會讓我在兩個平台上都加入。

我是否必須使用對RegAsm工具的調用,或者我缺少x64平台的某些標簽或Interop注冊選項? 有人可以幫忙嗎?

使用wix,您需要做兩件事來禁用注冊表反射:

  1. 將組件標記為64位組件(屬性Win64 =“yes”)(正如您所做的那樣)
  2. 將包構建為64位包(Platform = x64)

此程序包在x86系統上不可用。 所以你需要兩個包,一個用於x86,另一個用於x64。 您可以對兩個包使用相同的源文件,因為x86包將忽略Win64屬性。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM