Quantcast
Channel: SAPIEN Forums
Viewing all articles
Browse latest Browse all 531

PowerShell GUIs • Re: GUI Application Version Comparison (to check if latest version is being run)

$
0
0
Typically you split the version numbers in its three parts. Major, Minor, build, and convert them to integers.
Then compare the major numbers, then minor and lastly build.
if(oldmajor < newmajor) update
if(oldmajor == newmajor && oldminor < newminor) update
if(oldmajor == newmajor && oldminor == newminor && oldbuild < newbuild) update

Not elegant but it works.
This also works if someone starts to make versions like 1.02.031 and you compare to 1.2.4
I have to point out that 1.2.31 is a later version than 1.2.4 :D

Statistics: Posted by Alexander Riedel — Fri Jan 26, 2024 1:05 am



Viewing all articles
Browse latest Browse all 531

Trending Articles