首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么我的CustomTable从我的Wix安装程序中丢失?

为什么我的CustomTable从我的Wix安装程序中丢失?
EN

Stack Overflow用户
提问于 2013-07-29 11:02:50
回答 1查看 562关注 0票数 0

我有一个数据驱动的自定义操作,我将它与表数据一起定义在它自己的文件中。当我运行我的安装时,它会失败,因为缺少自定义表(我已经和Orca检查过了,它不在那里)。

我意识到需要以某种方式引用这个片段,我在问题103390556344608中注意到了这个建议。

按照6344608中的建议,我将自定义操作定义移动到与表数据相同的片段中,如下所示:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <?include $(sys.CURRENTDIR)\Config.wxi?>

  <Fragment>
    <CustomTable Id="AscomDeviceProfiles">
      <Column Id="ProgId" Type="string" PrimaryKey="yes" Category="Text" />
      <Column Id="ChooserName" Type="string" />

      <Row>
        <Data Column="ProgId">ASCOM.Driver.Type</Data>
        <Data Column="ChooserName">$(var.InstallName)</Data>
      </Row>

    </CustomTable>

    <!-- Define the custom actions that will process the above table data -->
    <Binary Id="binRegAscomDeviceProfiles" SourceFile="$(var.Wix.RegisterAscomDeviceProfiles.TargetDir)\$(var.Wix.RegisterAscomDeviceProfiles.TargetName).CA.dll" />
    <!-- Register and check the return code - must run as "immediate" in order to access session data -->
    <CustomAction Id="caRegisterAscomDeviceProfiles" BinaryKey="binRegAscomDeviceProfiles" DllEntry="RegisterAscomDeviceProfiles" Execute="immediate" Return="check" />
    <!-- Unregister and ignore return code (allows uninstall to succeed even if ASCOM is broken) -->
    <CustomAction Id="caUnregisterAscomDeviceProfiles" BinaryKey="binRegAscomDeviceProfiles" DllEntry="UnregisterAscomDeviceProfiles" Execute="immediate" Return="ignore" />

  </Fragment>
</Wix>

在我的Product.wxs文件中,我通过调度自定义操作来引用它,如下所示:

代码语言:javascript
复制
<InstallExecuteSequence>
  <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWERPRODUCTFOUND AND NOT Installed</Custom>
  <RemoveExistingProducts Before='InstallInitialize' />
  <!-- Elevate to admin if required -->
  <Custom Action='IsPrivileged' Before='LaunchConditions'>Not Privileged</Custom>
  <!-- Create ASCOM device profiles during install finalize phase, but not if already installed -->
  <Custom Action="caRegisterAscomDeviceProfiles" Before="InstallFinalize">NOT Installed</Custom>
  <!-- Remove ASCOM device profiles during uninstall (but not maintenance mode) -->
  <Custom Action="caUnregisterAscomDeviceProfiles" Before="RemoveFiles">REMOVE ~= "ALL"</Custom>
</InstallExecuteSequence>

这正确地引入了自定义操作,并且在输出MSI文件中创建了二进制文件,InstallExecuteSequence条目也是这样:

但是定制的桌子却无处可见。我肯定我错过了一些显而易见的东西,但我看不出是什么。你能?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-07-29 11:47:43

我发现了问题。Wix源代码没有任何问题,有一个构建问题阻止了输出的正确重建。

我想我们要做的是删除这个问题,因为它真的是一条鲱鱼。我不确定是否要删除它,所以我会把它留给社区。如果有人想投票删除它,我没有异议。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17922362

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档