Can't tell what you are comparing, your install version or a file but for files...
Remember that there are really two versions of a file. The string version and the numerical version. The numerical version is what IS uses and the string is what you get when you select the version tab off of properties. Now, since you can have alphanumberic (not just numbers) versioning, you may want to write your own function here. And use StrCompare. Sound easy? Just remember that you should be comparing apples to apples and oranges to oranges; meaning that if there is a possibility of having 1.5.00.0S1 and 1.5.0000.0S1, you will have to take this into account and pad or whatever to get them the same number of chars between the ".".
I find it useful to work up a project (for debugging) that only has a few lines of code and an exit at the end of onbegin and basically check the version of a hardcoded fully qualified file. Messagebox out the numerical version before the exit so you can actually see what you are dealing with. There seems to be a difference between vb and c++ in that commas and periods work different. One to them only sets the string...can't remember which one at the moment but there is the hint on the fix if you have a discrepency.
(Edited by lasenbby at 1:50 pm on Dec. 3, 2001)