theycallmemorty
theycallmemorty

Reputation: 12962

Batch set version number for .exe and .dll files

Is there a tool that would allow me to to do something like this: thetool.exe '1.0.0.1' mydll.dll myexe.exe?

Basically I would like to automate the process of making my builds and then have a tool automatically set the version numbers for me.

Upvotes: 1

Views: 6688

Answers (2)

xt1
xt1

Reputation: 398

You can use the answers to this question: How do I set the version information for an existing .exe, .dll?

verpatch /va foodll.dll %VERSION% "%FILEDESCR%" "%COMPINFO%" "%PRODINFO%" "%BUILDINFO%"

Available at http://www.codeproject.com/KB/install/VerPatch.aspx?msg=3207401

With full sources...

Upvotes: 2

Ken White
Ken White

Reputation: 125671

The version number is stored in a VERSIONINFO resource (a compiled binary resource) inside the executable. Most IDEs or compilers come with a resource compiler as well (Delphi and C++ Builder include brcc32.exe, for instance).

Unless your IDE allows you to auto-increment a version or build number as part of the build process, you'll end up needing to create the text .RC file for a VERSIONINFO resource and using your resource compiler to compile it and add it to your final executable or dll.

Upvotes: 0

Related Questions