Build Professional MSI Installers Effortlessly with the Power of WiX Technology
Build Professional MSI Installers Effortlessly with the Power of WiX Technology
Inno SetupWiX ToolsetInstallShieldMSIX Packaging Tool
Check your inbox and confirm the
subscription
Exclusive Newsletter
Exclusive Newsletter
Get the latest WiX insights direct to your inbox. Subscribe now!
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
How to create an MSI installer with WiX
Written by Renato Ivanescu · June 20th, 2023
The MSI format is a widely recognized standard in the software industry for distributing software packages to Windows-based devices. MSI packages offer numerous advantages over alternative software installation methods, including enhanced reliability and improved performance.
WiX is an open-source toolset to build MSI packages. It enables developers to create a software installation by writing XML that describes components, registry entries, and other resources.
In this article, I’ll show you how to use WiX to create an MSI installer for a Windows Forms application. Let’s dive in!
Add the setup project to your application
Once you have created the Windows Forms application, the next step is to add the setup package to it.
- Right-click on the project solution → Add → New project.
- From the project list, choose Setup Project for WiX. You will find this template only if you have the Wix Toolset Visual Studio Extension installed. Need help installing it? We’ve got you – check out this tutorial.
After creating the setup project, you should see it in _Solution Explore_r. The Product.wxs file is the one containing the setup project logic.
Add project output to your setup project
Next, we need to include the deployable files in the setup project. To achieve this, we can use the Wix Setup Editor.
Wix Setup Editor is an interactive GUI used to manage the setup files. It is available only if you have the Wax extension installed. If you want to see how to add the extension, you can also read this article.
To open the editor, go to Tools → WiX Setup Editor. Here we have to make some configurations:
- Select the setup project in the ‘Setup project to edit’ section. In our case, it is AppSetup.
- For the ‘Root directory’, select INSTALLFOLDER.
- In the ‘Projects to install section’, select your Window Forms application. We selected MyApp, as this is our application.
Make sure the files have the resolved state like in the image above. If they have the unmapped state as shown below, update it to resolved by pressing the ‘+’ button under the warning sign.
How to edit product details
To modify the product details, navigate to the Product.wxs file and make the necessary edits to the relevant fields. For example, we set the version to 1.2 and the manufacturer to Caphyon.
Copy
How to create Shortcuts for your application?
In order to create a shortcut, we will need to make edits to the XML file since the Wix Setup Editor does not provide direct shortcut creation functionality.
Follow the next steps to add a shortcut on the Desktop and one in the Programs Menu:
1. Define the directory structures.
Copy
2. Add the shortcuts to the installer package.
Copy
3. Tell Windows to install the shortcuts.
<Product Id=”*” ….>
….
Copy
How to add installation dialogues?
By default, when you create an installer package using WiX, it does not include a user interface (UI). However, if you wish to incorporate a minimal UI, you can follow the steps outlined below:
1. Right-click in the setup project → Add → _Reference_s. In the Add Reference dialog, look in the bin folder of the Wix toolset and add WinUiExtension.dll.
2. Go to the Product.wsx file and add the next line inside the <Product> element to reference the UI:
Copy
How to install your application?
Now, you can build the setup project.
- Go to the bin folder inside the setup project folder to find the MSI file.
- Run the file and install the application.
- After the installation, you should find the shortcuts on the Program Menu and Desktop.
Conclusion
WiX toolset is a flexible tool for creating installer packages but when it comes to more complex packaging scenarios, it may require additional time and effort. The WiX Setup Editor offers limited functionalities, and you will often need to manually edit the XML file to configure most settings.
Alternatively, you can explore a GUI-based tool like Advanced Installer to create and manage installation packages. It has a user-friendly interface and is much easier to use. It provides a range of pre-built templates which simplify the process of creating MSIs.
You can watch the tutorial below to see how easy it is to create an MSI with Advanced Installer.
Advanced Installer #1 alternative to the WiX Toolset
We decided to focus on our main goal to save precious time of our developers.
HANS-LEO TEULINGS
PHD – CEO, NEUROSCRIPT, LLC
You might find useful:
- CAB Embedding Options in MSI
- Updated installers in WiX Toolset
- Custom Actions In WiX Toolset
- Windows Services with WiX Installer
- Set WiX Installer Version to the Current Build Version
- Remove Files and Folders when Uninstalling with WiX
- How to set a WiX Toolset custom action to run only on uninstall
- How to create non-advertised shortcuts for all users / per machine with WiX Toolset
- How to Remove Files on Uninstall Using WiX Toolset
- How to create major upgrades for MSI packages using WiX Toolset
- How to pass CustomActionData to a CustomAction using WiX
- How to build an installer without a license page using WiX Toolset
- How to create a WiX KeyPath attribute
- How to Create a Desktop Shortcut using WiX Toolset
- How to Use WiX MSI to Update an Installed Application
- How to correctly set the install folder in Wix
- WiX Toolset Visual Studio Extension
- How to create a custom dialog in WiX for user input
- How to create an MSI installer with WiX
- How to use WIX MSI to do a silent install or uninstall of a web app
Get the most from packaging with Advanced Installer
Try the 30-day fully-featured edition absolutely free!
No credit card required
Also read:
- [New] In 2024, Incorporating Markers A Step-By-Step Videography Guide
- [Updated] TOP 3 Voice Capturing iPad Apps Reviewed
- 2024 Approved Bridging Light and Time IPhone's Extended Exposure Techniques
- 2024 Approved Pro Gamers & Casters to Subscribe Now
- 4 Ways to Transfer Music from Xiaomi Redmi A2+ to iPhone | Dr.fone
- Free Vs. Paid The Best 3D Animation Software for Creators
- How To Secure Your Canon D530's Optimal Functioning With Latest Driver Downloads
- Introducing Apple's Anticipated Vision Pro Glasses: A Comprehensive Review
- Introducing Stable Diffusion 3: Next-Level AI Innovation Unveiled
- Is Investing in a Virtual Reality (VR) Headset Worth It?
- Join the Universal, Zero-Cost Meta VR Community - A New Era of Virtual Interaction Begins!
- Mastering Personalized Text Generation: Emulating Your Writing Style with ChatGPT
- Maximizing Your Creative Outputs: Mastering the Synergy of ChatGPT, Dall-E Ter, and MidJourney
- My Disappointing Experience with Online Car Shopping at Carvana Vs. Traditional Dealers
- Next-Level Smart Features: How Apple's Cutting-Edge Artificial Intelligence Transforms Siri and App Usage
- Revolutionary Milestone by T-Mobile: Ultimate Speed Triumphs as New Record for Sub-6 5G Uploads Established
- Tailored Guide to Following and Watching Facebook Broadcasts
- Troubleshooting Windows 11: Resolving Webcam Error Code A00F4289
- Upgrade Now: Why Switching From Your Outdated Android Device Is Essential
- Title: Build Professional MSI Installers Effortlessly with the Power of WiX Technology
- Author: Donald
- Created at : 2024-10-02 19:02:15
- Updated at : 2024-10-03 18:50:21
- Link: https://some-tips.techidaily.com/build-professional-msi-installers-effortlessly-with-the-power-of-wix-technology/
- License: This work is licensed under CC BY-NC-SA 4.0.