WiX:InstallUISequence和InstallExecuteSequence之间的属性值丢失 [英] WiX: property value lost between InstallUISequence and InstallExecuteSequence

查看:87
本文介绍了WiX:InstallUISequence和InstallExecuteSequence之间的属性值丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 WiX 安装程序遇到问题.

I'm facing an issue with my WiX installer.

我有一个自定义对话框,其中包含链接到属性的编辑控件.在运行时,如果我更改了edit控件中的值,则从日志中看到该属性已使用该新值正确更新.但是,当 InstallUISequence 结束时,该属性将重置为其默认值,这很烦人,因为我不能在

I have a custom dialog that contains an edit control linked to a property. At runtime, if I change the value in the edit control, I see from the log that the property is properly updated with that new value. But it seems that, when the InstallUISequence ends, the property is reset to its default value, which is annoying, because I cannot use the user sumitted value in a custom action part of the InstallExecuteSequence.

以下是我使用的WXS脚本的摘录:

Here is an extract of the WXS script I use:

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

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

I must not be on the right track to exchange information between the two sequences.

有办法吗?

推荐答案

您需要标记属性安全",以使其从客户端(InstallUISequence)传递到服务器端(InstallExecuteSequence).为此,您需要使属性公开"(全部大写)并确保安全.像这样:

You need to mark the Property "Secure" for it to pass from the client-side (InstallUISequence) to server-side (InstallExecuteSequence). To do that you need to make the Property "public" (ALL CAPS) and secure. Something like so:

<Property Id="PLISTFILE" Secure="yes"/>

除非您希望默认情况下在用户界面中显示某些内容,否则不需要给它赋值.

You don't need to give it a value unless you want something to show up by in your UI by default.

这篇关于WiX:InstallUISequence和InstallExecuteSequence之间的属性值丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆