The code will first check whether the registration information has been completed and then call the VerifyLicenseInfo method. Open the CustomAction.cs file and rename the CustomActionMethod1 method to ShowLicenseInfo and change its code to the following: public static ActionResult ShowLicenseInfo (Session session ) For this example, we’ll focus primarily on the CustomAction.cs file. This project will create a custom action project that contains a nfig and CustomAction.cs file.
You’ll find the project template for this under Windows Installer XML: In order to create a WiX custom action, we first need to add a new C# Custom Action project to our solution.
To recap, our Product.wxs file was as follows: For this example, we’ll re-use the same setup and Windows forms project.
#Express zip registration code 2014 how to#
In my last article where we discussed how to implement a WiX installer upgrade, we’ve created a WiX installer project for a simple Windows Forms application.
In this example, we’ll write a simple custom action that will prompt the user to enter their product registration information. If, however, you need more flexibility over the installation process the WiX toolset provides custom actions. The WiX Toolset provides a number of standard actions that are sufficient for most installers.