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

Write version info from code..

131 views
Skip to first unread message

Tor Tveitane

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to
Hi,

Does it exist a way to write a D5 project's EXE version data from itself's
Delphi code...? It would be nice to avoid having to open
Project/Options/version every time...

regards

Tor

Peter Below (TeamB)

unread,
Sep 30, 2000, 3:00:00 AM9/30/00
to
How often do you need to change the version info manually? The build number
is incremented on its own if you do a Project| Build.


Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!


Tor Tveitane

unread,
Oct 1, 2000, 3:00:00 AM10/1/00
to
Peter Below (TeamB) <10011...@compuXXserve.com> wrote in message
news:VA.00005e1...@antispam.compuserve.com...

> In article <8r1ttk$rd...@bornews.borland.com>, Tor Tveitane wrote:
> > Does it exist a way to write a D5 project's EXE version data from
itself's
> > Delphi code...? It would be nice to avoid having to open
> > Project/Options/version every time...
>
> How often do you need to change the version info manually? The build
number
> is incremented on its own if you do a Project| Build.
>

Hi Peter,

I use a installer for my software (Youseful). For clarity's sake I want to
display the version data of my main executeable from the setup.exe file.
There is no provision to retrieve the version data from packed installer
files in Youseful, and hence I want to 'manually' set/write version data in
setup.exe as the same version as the main executeable inside the install.
Setup then reads its own version data and displays it is the setup opening
screen.

regards

Tor

Peter Below (TeamB)

unread,
Oct 1, 2000, 3:00:00 AM10/1/00
to
In article <8r70vd$c3...@bornews.borland.com>, Tor Tveitane wrote:
> I use a installer for my software (Youseful). For clarity's sake I want to
> display the version data of my main executeable from the setup.exe file.
> There is no provision to retrieve the version data from packed installer
> files in Youseful, and hence I want to 'manually' set/write version data in
> setup.exe as the same version as the main executeable inside the install.
> Setup then reads its own version data and displays it is the setup opening
> screen.
>
Tor,

well, version information goes into a standard Windows VERSIONINFO resource,
so with a good understanding of the PE executable file format one could find
and change the resource in an existing EXE. Basically like a resource linker
does it. It is not a trivial task, however. If you build this setup.exe
yourself you may be able to automate the task, however. The IDE keeps the
version info for the project in the projects DOF file, which is a simple
INI-style text file. All you need is to copy two sections ([Version Info] and
[Version Info Keys]) from your projects DOF to the setup.dof and then rebuild
the setup project. None of the two projects should be open in the IDE when you
do this.

Tor Tveitane

unread,
Oct 1, 2000, 3:00:00 AM10/1/00
to
Peter Below (TeamB) <10011...@compuXXserve.com> wrote in message
news:VA.00005e2...@antispam.compuserve.com...

> Tor,
>
> well, version information goes into a standard Windows VERSIONINFO
resource,
> so with a good understanding of the PE executable file format one could
find
> and change the resource in an existing EXE. Basically like a resource
linker
> does it. It is not a trivial task, however. If you build this setup.exe
> yourself you may be able to automate the task, however. The IDE keeps the
> version info for the project in the projects DOF file, which is a simple
> INI-style text file. All you need is to copy two sections ([Version Info]
and

Hi again,

Unfortunately setup.exe is built entirely by the installer builder which is
a ready compiled project (EXE file). Even if I set this installer builder
version to 9.9.9 no version information is built/transferred into setup.exe.

The DOF approach would have been simple, but it seems that I need to use
some external utility which can merge version information into a EXE which
has no version resource initially. Does such a utility exist, or do I just
have to skip this wish of mine to include version information in my
installer...?

Thanks anyway for the information you have given

best regards

Tor

Angus Johnson

unread,
Oct 2, 2000, 3:00:00 AM10/2/00
to
> The DOF approach would have been simple, but it seems that I need to use
> some external utility which can merge version information into a EXE which
> has no version resource initially. Does such a utility exist, or do I
just
> have to skip this wish of mine to include version information in my
> installer...?

My utility Resource Hacker will do what you want - add a versioninfo
resource to an exe file. (Note however, it wont allow modifying or deleting
an existing versioninfo resource to prevent unscrupulous users from changing
existing copyright info.)

Freeware, works on Win9x, WinNT and Win2000:
http://rpi.net.au/~ajohnson/resourcehacker/

angus j.

Peter Below (TeamB)

unread,
Oct 2, 2000, 3:00:00 AM10/2/00
to
In article <8r802d$jr...@bornews.borland.com>, Tor Tveitane wrote:
> Unfortunately setup.exe is built entirely by the installer builder which is
> a ready compiled project (EXE file). Even if I set this installer builder
> version to 9.9.9 no version information is built/transferred into setup.exe.
> The DOF approach would have been simple, but it seems that I need to use
> some external utility which can merge version information into a EXE which
> has no version resource initially. Does such a utility exist,

Borlands Resource Workshop can do it, i have recently seen a reference to a
tool named ResourceHacker on these groups but did not store the URL. Do a
websearch for that on google.com, or search the groups via one of the usual
search engines

http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://www.deja.com

Tor Tveitane

unread,
Oct 2, 2000, 3:00:00 AM10/2/00
to
Angus Johnson <ajoh...@rpi.net.au> wrote in message
news:39d7b9fb_1@dnews...

> > The DOF approach would have been simple, but it seems that I need to use
> > some external utility which can merge version information into a EXE
which
> > has no version resource initially. Does such a utility exist, or do I
> just
> > have to skip this wish of mine to include version information in my
> > installer...?
>
> My utility Resource Hacker will do what you want - add a versioninfo
> resource to an exe file. (Note however, it wont allow modifying or
deleting
> an existing versioninfo resource to prevent unscrupulous users from
changing
> existing copyright info.)
>
> Freeware, works on Win9x, WinNT and Win2000:
> http://rpi.net.au/~ajohnson/resourcehacker/
>

Hi Angus,

Thanks for this tip. However I downloaded it right now and opened one of my
setup.exe files. It did not display any version information (I know
setup.exe has no version information set) but I did not find any menu item
in tyour program where I could set it, either.

However I need to have this automated and it appears that your program can
use command line parameters.

How can I set setup.exe's version to 2.1.3.1 with command line parameters..?

TIA if there is a solution to this

regards

Tor

> angus j.
>
>

Angus Johnson

unread,
Oct 2, 2000, 3:00:00 AM10/2/00
to
> setup.exe files. It did not display any version information (I know
> setup.exe has no version information set) but I did not find any menu item
> in tyour program where I could set it, either.
....

> How can I set setup.exe's version to 2.1.3.1 with command line
>parameters..?

Tor,

The menu item required is: Special | Add a New Resource...
This opens a dialog which allows you to choose any resource
located within a resource (*.res) file. You can use the
*.res file created by your project to get the VersionInfo.

Unfortunately, the only commandline functionality I've
implemented is to allow a filename parameter which
enables file drag and drop onto the Resource Hacker
icon (or shortcut). To implement the full functionality of RH
via the commandline would be very messy to implement:
adding/modifying/deleting/extracting resources which all
require type/name/language identfiers. I can't see how to
do this elegantly.

Any further followup questions to this should be posted in
"thirdparty-tools" or via email.

angus j.


0 new messages