1. Easy Steps: Successfully Applying Changes with the WiX Toolset Installation Process
1. Easy Steps: Successfully Applying Changes with the WiX Toolset Installation Process
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 Implement Updates Using WiX Toolset Installer
Written by Radu Popescu · June 7th, 2021
In this post, we will address installer updates with a focus on the most common scenarios you may encounter when performing a small, minor, or major upgrade.
First, we will see what is inside your WiX Toolset base application and move on to the different types of updates that you can execute for your WiX installers.
What Is Inside Your WiX Toolset Base Application?
To better understand how an application upgrade works, we should first know what its components are and how they interact with each other.
For the scenarios presented in this article, we are using WiX Toolset version 3.11.2. Our base sample application contains an executable file “CMtrace.exe” and a text file“guide.txt” which has the information shown below.
Take note of the ProductID,UpgradeCode, and PackageID in the code below. It will be helpful for future references since they are the ones that are modified through the upgrading process.
Our base application has the following code inside the WiX installer project.
Copy
What Are The Main Types of WiX Update Installers?
Small Updates
Small Updates are used to perform small alterations to one or a few files without changing the product version (major.minor.build) or Product ID GUID.
If you look at our example below, you can observe that the only modification to the package is the text inside the guide.txt file. Since this is a quick fix, you can consider Small Update as a hotfix.
In this case, the element changed in the code is: Package GUID
Copy
Minor Updates
Minor Updates are used to perform minor changes to a package increasing its version.
Since the product remains the same, you don’t need to change the Product GUID.
The only elements changed in the code are the Version attribute and Package GUID.
Copy
Major Updates
Major Updates are used to perform crucial changes to a package, upgrading them from the full version to another.
Let’s assume we perform a Major Upgrade to our application which has the main executable CmTrace2.exe and the 1.0.0 version. Once the upgrade is done, and the functionality is added, the application version will also change to 2.0.0.
The elements changed in the code compared to our base application are Version attribute, Product, and Package GUID.
As a best practice, the UpgradeCode should also be changed every time you make a Major upgrade to your package.
Copy
You can check the types of upgrades and the differences between them in our article on Updates Deployment .
How to Implement WiX Installer Upgrades - Common Scenarios
Updates are meant to keep track of changes performed to previous versions. No matter what scenario you follow, you should always have the UpgradeCode from the previous version in hand.
Here are some of the common scenarios we will encounter when implementing WiX installer updates.
Detecting and Replacing Files and Versions
In this scenario, we want our new package todetect the previous version and include the additional files that we added to our new package.
To do this, we need to add the section below to the code:
Copy
Upgrade Id should have the value ofUpgradeCode from our base application (the one mentioned at the beginning of this article).
OnlyDetect must be set to yes. If set to no, it will remove the previous version.
Minimum and maximum attributes define the version range in which the update will be applied (if found).
Detecting and Replacing the Previous Version Completely
Here, we want our package to remove the previous version. Also, the package can be installed as a standalone. This is mostly used for Major Upgrades.
The only change here is the OnlyDetect value and the maximum value, since now our version range is different (our new application is now version 2.0).
The code should now look like this:
Copy
More about WiX Toolset: We have a dedicated resource page about the WiX Toolset , which includes various topics related to your installer, using custom actions in WiX, and setting a WiX installer build to the current version .
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] 10 Shopping Powerhouses Where to Buy Personalized Present Wrappers
- [New] In 2024, Battle Royale Queens Top 10 Female YouTubers
- [Updated] 2024 Approved The Top 10 Most Accessible, Costless LUT Tools Unveiled
- [Updated] Best Tools for Crafting Memorable Instagram Reels (Top 6) for 2024
- Elevating Your Earning Game with YouTube Monetization Strategies
- Enhanced Conversion Tracking with the Latest Cookiebot Integration
- Enhanced with Advanced Web Tracking Technology: Experience Seamless User Targeting
- Experience Enhanced Online Engagement with Our Cookiebot SEO Solutions!
- From 2D to 3D: A Tutorial for Social Media Success
- Harnessing the Power of Cookiebot: Elevate Your Website Experience
- High-Performance Drones Sold Here
- How to Unlock SIM Card on Oppo A1x 5G online without jailbreak
- The Right Platform for Content Creation for 2024 Podcast or Video?
- Title: 1. Easy Steps: Successfully Applying Changes with the WiX Toolset Installation Process
- Author: Donald
- Created at : 2024-09-30 17:37:33
- Updated at : 2024-10-03 20:16:46
- Link: https://some-tips.techidaily.com/1-easy-steps-successfully-applying-changes-with-the-wix-toolset-installation-process/
- License: This work is licensed under CC BY-NC-SA 4.0.