加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

WiX:InstallUISequence和InstallExecuteSequence之间丢失的属性

发布时间:2020-12-13 22:28:31 所属栏目:Windows 来源:网络整理
导读:我的 WiX安装程序遇到问题. 我有一个自定义对话框,其中包含链接到属性的编辑控件.在运行时,如果我更改编辑控件中的值,我会从日志中看到该属性已使用该新值正确更新.但似乎在InstallUISequence结束时,属性被重置为其默认值,这很烦人,因为我无法在InstallExecu
我的 WiX安装程序遇到问题.

我有一个自定义对话框,其中包含链接到属性的编辑控件.在运行时,如果我更改编辑控件中的值,我会从日志中看到该属性已使用该新值正确更新.但似乎在InstallUISequence结束时,属性被重置为其默认值,这很烦人,因为我无法在InstallExecuteSequence的自定义操作部分中使用用户的总和值.

这是我使用的WXS脚本的摘录:

<UI>
    <Dialog Id="select_list" Width="370" Height="270" Title="Select license and list files">
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="UIBannerBmp" />
        <Control Id="BannerLine" Type="Line" X="0" Y="45" Width="370" Height="0" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
        <Control Type="Edit" Id="list" Width="211" Height="15" X="128" Y="128" Property="pListFile" />
        <Control Type="Text" Id="static_list" Width="78" Height="17" X="41" Y="154" Text="list file" />
        <Control Type="PushButton" Id="next" Width="50" Height="17" X="232" Y="244" Text="Next &gt;">
            <Publish Event="EndDialog" Value="Return">1</Publish>
        </Control>
        <Control Type="PushButton" Id="cancel" Width="50" Height="17" X="296" Y="244" Text="Cancel">
            <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
        </Control>
        <Control Type="Text" Id="desc" Width="348" Height="16" X="8" Y="90"
                 Text="Please set the path of the the list file" />
    </Dialog>

    <InstallUISequence>
        <Show Dialog="select_list" After="WelcomeEulaDlg">NOT installed</Show>
    </InstallUISequence>
</UI>

<CustomAction Id="InstallService"
              ExeCommand="[bin]prog.exe -f install.cl '[pListFile]'"
              Execute="immediate"
              Return="check"
              Directory="bin" />

<InstallExecuteSequence>
    <Custom Action="InstallService" After="InstallFinalize">REMOVE=""</Custom>
</InstallExecuteSequence>

<CustomActionRef Id="InstallService" />
<Property Id="pListFile" Value="c:" />

我不能在正确的轨道上交换两个序列之间的信息.

有没有办法做到这一点?

解决方法

您需要将属性“安全”标记为从客户端(InstallUISequence)传递到服务器端(InstallExecuteSequence).要做到这一点,你需要使属性“公开”(所有大写)和安全.像这样的东西:

< Property Id =“PLISTFILE”Secure =“yes”/>

除非您希望默认情况下在UI中显示某些内容,否则您无需为其指定值.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读