简体   繁体   中英

Creating a WIX installer with conditional operations

I have a Windows Form Project and I need to create an installer for the same. I need to add prerequisites like .net 4.5 and vC++ redistributables.

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.

a) Can I have condition based movement between dialog boxes?

b) Can I write custom code between dialog boxes to perform a certain task, after the installation has been initiated?

PS - I haven't worked with Wix before, so links that might help me in building the installer will be of real help.

@Prashant,

1) Have you looked at Conditional Statements yet? 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

2) Depending on what tasks you are trying to perform, there might be an existing Wix Component that covers it. 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

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

3) Are you aware of the following resources?

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

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

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

There should be more than sufficient information here to get you going.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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