I have some executables that need to be updated each time Win 10 does a Spring/Fall update.
I'm wondering if there is an easy way to compare version numbers for a "greater than", "less than" approach. I'm not talking about version numbers in the sense of Win 8 and Win 8.1, and I'm not thinking of a particular product (e.g., Windows or TCMD).
For instance, on this PC echo %@verinfo[%windir\explorer.exe] produces:
10.0.17763.1 (WinBuild.160101.0800) [which is Oct 2018, ver 1809]
The version that had to be replaced has:
10.0.17134.165 (WinBuild.160101.0800) [which is Apr 2018, ver 1803]
Note that--as is common with version number schemes--there is more than one period in the version number, so a simple numeric comparison won't work.
I do realize the number can be parsed into fields and then the individual fields can be compared. But I'm wondering if there is a simpler way.
Or maybe TCC could add an @VERCOMP[path1,path2] function that returns Newer, Same, or Older (probably 1 for "file 1 is newer build, 0 for "same build", -1 for "file 1 is older build")
I'm wondering if there is an easy way to compare version numbers for a "greater than", "less than" approach. I'm not talking about version numbers in the sense of Win 8 and Win 8.1, and I'm not thinking of a particular product (e.g., Windows or TCMD).
For instance, on this PC echo %@verinfo[%windir\explorer.exe] produces:
10.0.17763.1 (WinBuild.160101.0800) [which is Oct 2018, ver 1809]
The version that had to be replaced has:
10.0.17134.165 (WinBuild.160101.0800) [which is Apr 2018, ver 1803]
Note that--as is common with version number schemes--there is more than one period in the version number, so a simple numeric comparison won't work.
I do realize the number can be parsed into fields and then the individual fields can be compared. But I'm wondering if there is a simpler way.
Or maybe TCC could add an @VERCOMP[path1,path2] function that returns Newer, Same, or Older (probably 1 for "file 1 is newer build, 0 for "same build", -1 for "file 1 is older build")