
Setting Your WiX Installer's Version Number: Match It with the Latest Build

Setting Your WiX Installer’s Version Number: Match It with the Latest Build
Inno Setup
WiX Toolset
InstallShield
MSIX 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 Set WiX Installer Version to the Current Build Version
Written by Radu Popescu · June 7th, 2021
Do you need your installer to keep its current build version? In this article, will go through all the steps you need to set your WiX installer version to the current build version.
Start with Your Base Application
We will use a hypothetical scenario using WiX Toolset version 3.11.2 to help illustrate how to set a WiX installer version to the current build version.
For this example, the first thing we have to do is create a sample basic application containing an executable file called “CMtrace.exe” and a text file called “guide.txt” that includes the information shown below.
It is important to look inside the WiX installer project code since it will be the one modified through the updating version process.
Copy
Using Binder Variables to Pass the Product Version of the Current Build Version
If we take a look in our code, we see that the <Product […] Version=”1.0.0.0”> and the version value is hardcoded. What we want to achieve is to update the version of our main executable file to the actual Product Version.
Doing that is pretty simple, we just need to use Binder Variables.
Binder Variables are properties that are not available until the linker is about to generate or bind the final output. The supported binder variables are All Versioned Files, Assemblies, Properties, Package Properties, Localization Variables, and_Custom Binder Variables_.
For an in-depth description of supported binder variables and examples, you can consult this article .
First, we have to pass the version of our CMTrace.exe file to our Product. For that, we need to take a look at our file declaration section.
Copy
For this example, we are using the “All Versioned Files” “bind.fileVersion.FileID” binder variable, where FileID is the value of our CMtrace.exe File Id and is equal to “File1”.
Now, all we need to do is replace the hard coded version from the <Product […] Version=”1.0.0.0”> section, with the following syntax:
<Product […] Version=”!(bind.FileVersion.File1)”
Copy
This is how our code should look like:
Copy
And, that’s it! You can now set the WiX Installer version to the current build version.
For more useful guides and tutorials, make sure to check ourdedicated page to the WiX open-source technology , where you can find everything from the basic principles of the WiX Toolset to more advanced tips for developers and IT Pros.
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:
- [Updated] In 2024, Content Calendar for Successful Instagram Filmmaking
- [Updated] In 2024, Unveiling the Leading 10 No-Cost YouTube Channels for Stunning Visuals
- [Updated] In Search of Alternatives to VLC Media Player for 2024
- 3 Solutions to Find Your Oppo A1 5G Current Location of a Mobile Number | Dr.fone
- Comparing Fingerprint Scanners: Optical Vs. Ultrasonic Technology
- Comprehensive Evaluation: Is Google's Pixel 8A Series at Its Final Chapter?
- Demystifying Creator Studio A Practical Handbook for 2024
- Gather Primary and Secondary Data:
- How to Unlock Tecno Camon 20 Premier 5G Pattern Lock if Forgotten? 6 Ways
- IMessage Prompts: Understanding the Reason Behind Contact Check-In Requests and Easy Fixes
- In 2024, The Art of Memes 9 Essential Elements for GIF Perfection
- Innovative Possibilities: My Wishlist for the New iPad Mini 7
- Sensory Engaging E-Commerce Platforms for 2024
- Title: Setting Your WiX Installer's Version Number: Match It with the Latest Build
- Author: Donald
- Created at : 2024-10-01 18:24:50
- Updated at : 2024-10-03 20:04:07
- Link: https://some-tips.techidaily.com/setting-your-wix-installers-version-number-match-it-with-the-latest-build/
- License: This work is licensed under CC BY-NC-SA 4.0.