Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ms word 使用WiX注册x64 Word 2010加载项_Ms Word_Wix_Vsto_Com Interop - Fatal编程技术网

Ms word 使用WiX注册x64 Word 2010加载项

Ms word 使用WiX注册x64 Word 2010加载项,ms-word,wix,vsto,com-interop,Ms Word,Wix,Vsto,Com Interop,我正在使用WiX部署一个Word加载项,关于x84目标平台(至少Office安装必须是x86,无论使用哪种操作系统平台),一切正常,Word加载项的COM互操作注册工作正常,并且在我安装加载项后第一次启动Word时,加载项自动启动 我正在对注册表执行以下注册操作(从heat.exe的输出中剪切) 我创建了一个中间文件,使用以下heat命令帮助我完成COM互操作注册: "C:\Program Files\Windows Installer XML v3.5\bin\heat.exe" file M

我正在使用WiX部署一个Word加载项,关于x84目标平台(至少Office安装必须是x86,无论使用哪种操作系统平台),一切正常,Word加载项的COM互操作注册工作正常,并且在我安装加载项后第一次启动Word时,加载项自动启动

我正在对注册表执行以下注册操作(从heat.exe的输出中剪切)

我创建了一个中间文件,使用以下heat命令帮助我完成COM互操作注册:

"C:\Program Files\Windows Installer XML v3.5\bin\heat.exe" file MyAddin.dll -ag -template fragment -out MyAddin.wxs 
Interest的输出如下:(我知道以这种方式使用RegistryValue已被弃用)


包含此内容的组件将Win64Flag标记设置为yes。因此,我认为事情将写入注册表的x64部分。在此之前,我阅读了以下关于讲述这一点的文章:

例如,32位InprocServer32键与64位应用程序无关,因此InprocServer32键不会反映到64位注册表视图中

此外:

但是,64位应用程序可以使用32位LocalServer32键,并且LocalServer32键会得到反映

但是我已经尝试使用LocalServer32而不是InprocServer32,但是这样做不会让我的外接程序在两种平台上都启动


对于x64平台,我是否必须使用调用或缺少某个标记或互操作注册选项?有人能帮忙吗?

使用wix,您需要做两件事来禁用注册表反射:

  • 将组件标记为64位组件(属性Win64=“yes”)(如您所做)
  • 将包构建为64位包(平台=x64)
  • 此软件包在x86系统上不可用。因此,您需要两个软件包,一个用于x86,一个用于x64。您可以对这两个包使用相同的源文件,因为x86包会忽略Win64属性

    <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" />