简体   繁体   English

使用条件操作创建WIX安装程序

[英]Creating a WIX installer with conditional operations

I have a Windows Form Project and I need to create an installer for the same. 我有一个Windows窗体项目,我需要为它创建一个安装程序。 I need to add prerequisites like .net 4.5 and vC++ redistributables. 我需要添加先决条件,如.net 4.5和vC ++可再发行组件。

The basic issue is that I need the installer to work offline as well as online, and in those scenarios I need it to move through different dialogs that accept different sets of input from the users. 基本问题是我需要安装程序脱机工作以及在线工作,在这些情况下,我需要它来移动不同的对话框,这些对话框接受来自用户的不同输入集。 Further, for offline verification task, a certain code is generated after the users have initially entered some inputs. 此外,对于离线验证任务,在用户最初输入一些输入之后生成某个代码。

I need to ask if Wix should be used for this or should I use something else, and if Wix will be useful for resolving my above-mentioned issues. 我需要问Wix是否应该用于此,或者我应该使用其他东西,如果Wix对解决我的上述问题有用。

a) Can I have condition based movement between dialog boxes? a)我可以在对话框之间进行基于条件的移动吗?

b) Can I write custom code between dialog boxes to perform a certain task, after the installation has been initiated? b)在安装启动后,我可以在对话框之间编写自定义代码来执行某项任务吗?

PS - I haven't worked with Wix before, so links that might help me in building the installer will be of real help. PS - 之前我没有和Wix合作,所以可能帮助我构建安装程序的链接将会有很大的帮助。

@Prashant, @Prashant,

1) Have you looked at Conditional Statements yet? 1)你看过条件语句了吗? Here's a pretty good example that covers a lot of what you're trying to do. 这是一个很好的例子,涵盖了你想要做的很多事情。

How to install features depending on the value of property http://wixtoolset.org/documentation/manual/v3/xsd/wix/condition.html 如何根据属性的值安装功能 http://wixtoolset.org/documentation/manual/v3/xsd/wix/condition.html

2) Depending on what tasks you are trying to perform, there might be an existing Wix Component that covers it. 2)根据您尝试执行的任务,可能存在覆盖它的现有Wix组件。 If not, you can also execute Custom Modules as illustrated here. 如果没有,您还可以执行此处所示的自定义模块。

http://wixtoolset.org/documentation/manual/v3/xsd/wix/customaction.html http://wixtoolset.org/documentation/manual/v3/wixdev/extensions/authoring_custom_actions.html http://wixtoolset.org/documentation/manual/v3/xsd/wix/customaction.html http://wixtoolset.org/documentation/manual/v3/wixdev/extensions/authoring_custom_actions.html

https://blogs.msdn.microsoft.com/jschaffe/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters/ https://blogs.msdn.microsoft.com/jschaffe/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters/

How to add custom action to wix setup project 如何向wix安装项目添加自定义操作

3) Are you aware of the following resources? 3)您是否了解以下资源?

https://github.com/deepak-rathi/Wix-Setup-Samples https://github.com/deepak-rathi/Wix-Setup-Samples

https://github.com/tom-englert/Wax https://github.com/tom-englert/Wax

https://github.com/rstropek/Samples/tree/master/WiXSamples https://github.com/rstropek/Samples/tree/master/WiXSamples

There should be more than sufficient information here to get you going. 这里应该有足够的信息让你去。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM