如何在wix安装程序中添加复选框
我正在使用 wix 安装程序。我在产品安装过程中实现了文件夹备份功能。我需要在我的设置安装中添加一个复选框来要求用户进行备份。如果他们选中该复选框,则只有系统需要进行备份。 如何在安装程序中添加复选框以及如何在我的 wix 文件中添加条件以进行备份。
谢谢, 桑托什
I am working with the wix installer. I have implemented a folder backup functionality during my product installation. I need to add a checkbox in my setup installation to ask the user for the backup. if they check the checkbox ,then only the system needs to take the backup.
how to add the checkbox in the installer and how to add a condition in my wix file to take a backup.
Thanks,
Santhosh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这应该给你一个想法:http:// /www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/
This should give you an idea: http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/
请注意:Checkbox 控件可能与直觉相反。该复选框不会在 0 和 1 或 true 和 false 等两个值之间进行选择。复选框值的工作方式更像是 C/C++ 中的 #define。如果该属性设置为任何值,则会选中相应的复选框。如果该属性具有未定义的值,则该框处于取消选中状态。此外,使用设置/取消设置属性的 WiX 条件将属性视为布尔值,无论其是否已定义,还是而不它的值是什么。例如,如果将该值设置为“0”,则该属性的条件测试将返回 true。
复选框语义的进一步讨论< /a>
Be warned: the Checkbox control can be counter intuitive. The checkbox does not choose between two values such as 0 and 1 or true and false. Checkbox values work more like #define in C/C++. If the property is set to any value, the corresponding checkbox is checked. If the property has an undefined value, the box is unchecked. Also, WiX conditionals using set / unset properties treat the property as a bool with respect to whether it is defined and not what it's value is. E.g. if you set the value to "0", the conditional testing the property will return true.
Further discussion of Checkbox semantics
按照 @imagi 提供的链接帮助我添加了如何添加复选框。我想我会将代码粘贴到此处,以防有一天给定的链接不再存在:
Following the link provided by @imagi have helped me to add find out how to add the checkbox. I figured that I will paste the code here in case the given link will cease to exist one day: