0

How could we use a custom product version format for Wix Product/@Version - Eg 2022.02.01?

If i do it using a compile time variable (@), it gives me the error - Product version must have a major version less than 256, a minor version less than 256, and a build version less than 65536

If i try using binder variables like file version, then it cannot have the format I need since I only need a 3-part format. Also it will not allow 02, since it makes it 2.

I've gone through some links like the below, which don't seem to help a lot with the scenario I have. https://stackoverflow.com/a/641094

https://stackoverflow.com/a/8555951/8052403

Any suggestions/ideas/guidance?

The Wix version we use is 3.10.2.2516. However I feel the behavior is irrespective of the version.

I see some entries in the Windows Features list (highlighted in snapshot below) which seem to have values greater than 256 in major/minor versions. "How did you do that?"

enter image description here

ajeesh k
  • 93
  • 8

1 Answers1

2

Correct. This is not a limitation of the WiX Toolset but the Windows Installer itself. See the ProductVersion documentation for details. To get that changed, you'll want to follow up with Microsoft to update the Windows Installer to allow your specialized product version.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • Thanks @Rob for helping out. I'm just curious how some programs manage to override that ask for major/minor versions. Posted a snapshot above. Would they have not eventually used Windows Installer to install the program? – ajeesh k Feb 24 '22 at 06:58
  • I would guess not. – Rob Mensching Feb 24 '22 at 19:09
  • Would updating the below registry key through code cause any issues? `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\\DisplayVersion`. I tried updating that manually and it seemed to do the job. Could there be any issues due to tweaking the registry entry in upgrade/reinstall scenarios? – ajeesh k Feb 25 '22 at 15:13
  • Could do. ARP ignores some of those registry values when it knows the package is an MSI. Maybe it doesn't ignore that value. I tend to shy away from messing with those things because they often have unintended consequences... even if it works. For example, now the ARP entry and your package version won't match. That is odd and could create routine support speed bump. – Rob Mensching Feb 25 '22 at 18:30