Aligning WiX Installer Versions with Real-Time Build Numbers - A How-To Guide
Aligning WiX Installer Versions with Real-Time Build Numbers - A How-To Guide
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 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:
- [New] Effective Ways to Tweak Songs' Playback Rate on Spotify
- [New] In 2024, Innovative Posting Add YouTube to Your Insta Narratives
- [Updated] Can Photoshop’s Image Smoothing Revolutionize Editing?
- 3 Things You Must Know about Fake Snapchat Location On Realme GT Neo 5 | Dr.fone
- In 2024, Comparative Study of YouTubes and DailyMentions
- Integrating and Utilizing NVIDIA's Cutting-Edge RTX AI Bot in Your Computer Setup
- Mastery in Digital Media Srgb Preference
- Maximize Social Media Impact with These 5 Tricks for Enhanced Facebook Productivity
- Revolutionizing Paperwork: Next-Generation Smart Document Handling Transforms Efficiency
- Revolutionizing the Financial Sector: How RPA and NLP Offer Innovative Solutions
- Unlocking Enterprise Potential: Enhancing ROI Through AI-Driven Content Strategies - Insights From the ABBYY Blog
- Utilizing Cookiebot Technology for Improved Site Analytics and Visitor Insights
- Weltweit Kooperiert Kodak Alaris Mit Abbyy Für Die Gemeinsame Digitale Datenverarbeitung
- Title: Aligning WiX Installer Versions with Real-Time Build Numbers - A How-To Guide
- Author: Donald
- Created at : 2024-09-28 16:39:21
- Updated at : 2024-10-03 17:35:43
- Link: https://some-tips.techidaily.com/aligning-wix-installer-versions-with-real-time-build-numbers-a-how-to-guide/
- License: This work is licensed under CC BY-NC-SA 4.0.