?? The two version strings I quoted are perfectly valid and the 2nd is a consistent jump up in build sequence: in both cases major version is 2, minor is 1; we're on the fourth build. In the real world you have to sometimes inherit software anyway.
I am not doing any version string comparisons myself, I was wondering how Windows Installer did it under the hood itself. I presume, the algorithm is like so but I wanted confirmation, especially regarding those leading zeros:
tokenMajor = extractTokenToPeriod(&szProductVersion1);
int iMajor1 = atoi(tokenMajor);
tokenMinor = extractTokenToPeriod(tokenMajor);
int iMinor1 = atoi(tokenMinor);
tokenBuild = extractTokenToPeriod(tokenMinor);
int iBuild1 = atoi(tokenBuild);
// same for the other string2....
bool isNewer = (iMajor2>iMajor1) || (iMinor2>iMinor1) || (iBuild2>iBuild1);
you get the drift of the logic