Wix不会基于unistall上的复选框设置属性值 [英] Wix does not set property value based on checkbox on unistall

查看:87
本文介绍了Wix不会基于unistall上的复选框设置属性值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 MyVerifyReadyDlg.wxs 复选框控件内部定义如下:

I have inside my MyVerifyReadyDlg.wxs checkbox control defined as following:

      <Control Id="REMOVELOGSFILESCHECKBOX" Type="CheckBox" X="170" Y="170" Width="80" Height="17"
            Property="REMOVINGLOGSPROPERTY" CheckBoxValue="0" Text="Remove logs files">
      <Condition Action="show">Installed</Condition>
      <Condition Action="hide">NOT Installed</Condition>
    </Control>

Product.wxs 中,我将该属性定义为:

and inside Product.wxs I have defined the property as:

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

以及 Product.wxs 里面,我都有此组件来删除日志卸载时的文件:

and also inside Product.wxs I have this component to remove a log files on uninstall:

  <Component Id="logsFolderComponent" Guid="*" Directory="logsFolder">
  <Condition>REMOVINGLOGSPROPERTY</Condition>
  <RemoveFile Id="allLogsFiles" Name="*.log" On="uninstall"></RemoveFile>
 </Component>

问题是:当我在检查过程中选中复选框时,它没有设置属性(stays null)卸载,但是如果我在安装时使用复选框,它将删除日志文件。

The problem is: it does not set the property(stays null) when I check the checkbox during an uninstallation, but if I use the checkbox on installation it removes the log files.

如何设置卸载属性?

推荐答案

在安装和后续操作之间的任何位置都不会自动保留属性。 WiX为此提供了记住属性模式。

Properties aren't automatically preserved anywhere between install and later operations. WiX provides the "remember property" pattern for this.

http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/

这篇关于Wix不会基于unistall上的复选框设置属性值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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