代码之家  ›  专栏  ›  技术社区  ›  cbuchart

如何在InstallExecuteSequence中定义自定义操作的状态文本?

  •  0
  • cbuchart  · 技术社区  · 6 年前

    我有一个安装程序,有几个自定义操作,例如:

    <customAction id=“install_drivers_32”directory=“dir_drivers”execommand='[dir_drivers]install_32_drivers.bat”'execute=“deferred”impersonate=“no”return=“ignore”/>gt;
    <customAction id=“install_drivers_64”directory=“dir_drivers”execommand=“[dir_drivers]install_64_drivers.bat”'execute=“deferred”impersonate=“no”return=“ignore”/>gt;
    

    在安装顺序中:

    安装执行序列 <custom action=“install_drivers_32”before=“installFinalize”><![CDATA[非版本nt64且未安装]]></custom> <custom action=“install_drivers_64”before=“installFinalize”><![CDATA[版本nt64,未安装]]></custom> </InstallExecuteSequence>

    我想向用户展示安装程序正在做什么:

    我该怎么做?

    我使用的是wixui_installdirui,我不想破坏默认布局。我还检查了This answerbut I don't understand how to do it(also,I don't need to update dynamically the status,just to show a text).

    在安装顺序中:

    <InstallExecuteSequence>
      <Custom Action="INSTALL_DRIVERS_32" Before="InstallFinalize"><![CDATA[NOT VersionNT64 AND NOT Installed]]></Custom>
      <Custom Action="INSTALL_DRIVERS_64" Before="InstallFinalize"><![CDATA[VersionNT64 AND NOT Installed]]></Custom>
    </InstallExecuteSequence>
    

    我想向用户展示安装程序正在做什么:

    enter image description here

    我该怎么做?

    我用的是WixUI_InstallDir我不想破坏默认布局。我也查过了this answer但我不明白该怎么做(另外,我不需要动态更新状态,只需要显示一个文本)。

    1 回复  |  直到 6 年前
        1
  •  3
  •   cbuchart    6 年前

    您很可能需要添加 ProgressText 该自定义操作的元素。如果您将该自定义操作名作为 Action ,然后是消息文本。


    例如,在 UI 元素:

    <ProgressText Action="INSTALL_DRIVERS_32">Installing drivers</ProgressText>