How to install WiX on Windows
WIX stands for windows installer XML is a toolset that supports a building of Windows Installation packages from the source code, which is in XML files. WIX supports the command line also so that developers can integrate the command line into the build process for building MSI and MSM packages for the Windows environment. With bootstrapper available in WiX, we can create a setup build that will install prerequisites like a .NET framework and other related software that needs to be there during runtime. The WiX software development kit includes libraries that are managed and native and allow developers to write code and applications which will work with the Windows installer.
Steps to Install WiX on Windows
Let us discuss the steps required to install WiX.
Step 1: To download and install WiX on windows, go to the official website of WiX as below https://wixtoolset.org/releases and choose the recommended build number, here we have chosen V3.11.1 and click on the download button.
Step 2: You will be redirected to the source code present in the version control system GIT, and we need to choose the appropriate .exe file and click on download. Here we have chosen wix311.exe and click on it, and then it will be downloaded.
Step 3: After completion of the download, click on the downloaded file/ run the .exe file, and we have got an error saying that .NET Framework 3.5.1 needs to be installed first as below:
Step 4: Now, we will install the .NET framework for Windows so that we can move further in the installation of WiX and type .NET framework 3.1.5 for windows in Google and click on the first link as below
Step 5: Now select the appropriate language and click on the download button as below
Step 6: Once the download is completed, run the .exe file so that it will search for required files and downloads the required files and finish the installation as below:
Step 7: In order to install the downloaded windows features as .NET framework 3.1.5, we need to enable windows features to turn on, and that can be done as below:
First, select the control panel and then in control panel search, type windows features turn and then you will get the option and then click on it and then you will get as below:
And tick the boxes for the futures you want to enable, and click on Ok and apply. So that the downloaded windows features will install.
Step 8: After the installation of windows features required for Wix. Now click on the .exe file of WiX and run it and then click on install and it will prompt for Yes or No and select the Yes option, and it will configure and complete the installation process as below:
Step 9: We have successfully installed WiX on our Windows 10 operating system, and now if we want to visit WiX main website, then you just need to click the WiX toolset in the above figure so that it will redirect to the WiX main website http://wixtoolset.org/.
Step 10: If we want to have a look at the license and read it, then we can click on the License page then it will open as below and read the agreement, and the sample output is as below:
Visual Studio Integration of WiX
- After successful installation of WiX on Windows machine, if we want to configure and integrate WiX with the visual studio, then we need to follow the procedure as below: First, we need to click on “click here to view available extensions” to see visual studio integration with WiX extensions then it will redirect to the WiX downloads and releases website, and then we need to choose the desired visual studio extension from the available extensions as below:
Now we have selected WiX Toolset Visual Studio 2017 extension, and then it will redirect to the Visual studio market place, and then we need to click on download and install as below:
- After successful initialization and checking all requirements on the system need to install, it will prompt as below, and we need to click on the install button so that visual studio integration with WiX extension package will install as below:
- After clicking on the install button, it will check the existing visual studio version on our system and modifies the installation by downloading the required packages and install the Microsoft.NET.Core package, WiX toolset visual studio extension.
- As WiX creates MSI packages, WiX uses Windows installer engine whereas WiX can be installed in other way using Visual Studio extension but which is not good as original WiX as it has only basic features and many limitations. So it is better to stay with the installation of WiX, and we can use visual studio WiX integration if a requirement is there.
How to Install WiX using Command line on Windows
- WiX can be installed on Windows using the command line or Power shell using the below command as follows:
Choco installs the WiX toolset.
The above command will install the WiX toolset on the Windows machine using a command line.
- WiX can be updated to the latest version on Windows using the command line using the below command as follows:
Choco upgrade wixtoolset
The above command will update the WiX toolset to the Windows platform’s latest version through a command line or Power Shell.
- The advantages of using WiX installer is we can achieve transactional, merge modules, automation, APIs, package validation, restart management, and localization.
- The WiX installer’s disadvantage is due to its complexity, upgrades, command line, architecture, steeper learning curve, no drag and drop option, and no automatic dependency inclusion.
- WiX toolset will have tools that convert source files to MSI packages and utilities with documentation.
- The votive is a Visual Studio extension that integrates the WiX toolset with visual studio, and it will have WiX project templates and Intellisense.
Finally, it’s an overview of how to install WiX on windows using the command line and download the executable from the WiX main website. We have also seen how to integrate the WiX toolset with the Visual Studio. I hope you will be able to install WiX on your machines without any issues after reading this article.
This has been a guide on How To Install WiX?. Here we have discussed the basic concept, visual studio integration and different steps to install Wix by using the Windows command line. You may also look at the following articles to learn more –