Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Getting product version


2 replies to this topic

Toby

Toby
  • Members
  • 6 posts

Posted 09 December 2001 - 11:54

I'm trying to get the product version from an file. I tried using the ProductVersion sample from this site but didn't seem to work for me.

I kept getting the major version of the file which I also get from VerFindFileVersion and VerGetFileVersion functions.

This needs to be done on multiple files and major version is same on all, so I don't feel like modify them all to verify the file version.

Anyway, I hope somebody out there got a solution for this.

Thanks in advance.
Regards,
Toby


lasenbby

lasenbby
  • Members
  • 744 posts

Posted 11 December 2001 - 19:36

Remember that there is two versions of a file, the string version (one from properties, version tab) and the numerical version (which IS uses).  The difference is in the internal compiled versioning, whether you use commas or periods.  One only work for string and the other works for both.  Use debug dialog to see what you are getting from IS version functions.  They work.

You should mention why you think they are not working.  Don't understand "I kept getting the major version".  These functions return what you need.  

Then just use strcompare or write your own function that parses and does inbetween "." compares.


Toby

Toby
  • Members
  • 6 posts

Posted 12 December 2001 - 06:34

What I meant with getting the major version is that each file has 2.1.0.0 which is same on all these files. And the product version is what has different numbers in 1.0 type of format. I hope that's making sense.

And what I kept getting is the 2.1.0.0 on each file so it's reading in wrong place. I will do some debugging and see what I can find, at the moment i'm doing it through the registery, seemed easier at the time.

Anyway, thanks for your suggestions.
Regards,
Toby