Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting Infomation (version info) from an .exe at Compile (Build) Time

2 views
Skip to first unread message

andrew...@my-deja.com

unread,
Aug 9, 2000, 3:00:00 AM8/9/00
to
Hi,

Can anyone tell me how to extract the product version number from
an executable file and put it in the string resources so that it's
available when the script runs on the end users machine?

To clear up the question and provide some motivation, let me put it
another way. Suppose I have a file called Test.exe that is part of
an install set. Test.exe has a Product Version of 654321-02. I would
like this number to appear on the "Setup Screen" when the end user
runs the install set. Sure, I could just manually put the number
under the Resources Tab/String Table/English, but then I have to
remember to change it each time the Product Version of Test.exe
changes.

Any help on this one would be much appreciated. Of course I can use
dlls to get info from Test.exe once it is in place on the end users
machine. However, the files are not put in place until after the
Setup Screen is displayed. I can get around the problem by not putting
Text.exe in a cab file; instead add it Setup Files/Advanced Files.
But this makes the installSet unnecessarily big and pretty much defeats
the purpose of having an install set. I can also write a simple
program to extract the version info from Text.exe and put it in a
dummy .dll whose sole purpose is to store the version info. I can
then put this small .dll in the Advanced Files section. (The Advanced
Files get immediately put in the target directory when you run the
script and are therefore ready for use, such as getting their version
info). This solution would be acceptable IF there was a way to
automattically do it during the Media Build phase.

Can anyone point me in the right direction on this problem? Is there
a way to modify what happens during the Media Build? I have seen many
articles about getting version info during script run time, but no
discussion of getting it programattically during Media Build time.

Thanks,

Andrew Walker
C++ Programmer,
Elgar Corp.


Sent via Deja.com http://www.deja.com/
Before you buy.

0 new messages