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

How can I get the version of an included EXE-file?


5 replies to this topic

Ralf

Ralf
  • Full Members
  • 63 posts

Posted 22 May 2002 - 16:27

Hi,
I want to display the version of an exe-file, which will be installed with the setup. The version should be displayed BEFORE the file is installed. One solution is to enter the version number in the code before creating the setup. But how can I read the version number out of the CAB-file?

Thanks,
Ralf

Blake Miller Wonder

Blake Miller Wonder
  • Members
  • 121 posts

Posted 23 May 2002 - 19:37

You could write a parser for the RPT file generated when you make the setup image.  The version informaiton is recorded into the RPT file.  Include the RPT file with your setup in the SUPPORTDIR and parse out the version number for your EXE file.

Or, write a different program that generates the version info for your executables into a INI type file just before you build your setup program.  Include this INI file into the SUPPORTDIR and then use the InstallScript INI file functions to extract the version number.  Then you can display it to your end user.

The InstallShield CAB files were in a proprietary file format.  I have yet to encounter a mechanism for pre-extracting a file or reading useful information out of them.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 23 May 2002 - 21:25

Ralf, I've been trying to think of a more automatic way to do this as well.

BMW, using the RPT file would have a lot of overhead because I think you'd have to build it once to update the file, copy it to SUPPORTDIR, and then rebuild the setup just to include the new version of the file.
user posted image

MKaiser

MKaiser
  • Full Members
  • 88 posts

Posted 24 May 2002 - 08:10

how about including the .exe in the disk1 folder and then trying to use VerGetFileInfo with SRCDIR ^ "your.exe"?

Regards,
Marko

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 25 May 2002 - 01:28

Yes, that certainly would be one way MKaiser and there several others that I can think of, but I personally am looking for a cleaner solution.

I'm suprised the IS tool doesn't have available a more direct approach for doing such things.
user posted image

Blake Miller Wonder

Blake Miller Wonder
  • Members
  • 121 posts

Posted 29 May 2002 - 19:37

No one said the RPT file had to be compressed into your build.  It could always sit uncomrpessed on the distribution media somewhere, so two builds would not be required, necessarily.  You could always write a tool to obtain all the version information from your product files, create a file similar to a RTP file, and include that file into the build of the setup and process its information at install time.  Then there would not be a two step proces and you could compress it into your setup.  Wihtout reverse engineerng the CAB files, I don't think you can get at the information without writing a tool or using the RPT file or having the EXE or DLL exposed on the distribution media.