1

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.

theycallmemorty
  • 11,427
  • 12
  • 47
  • 68
  • 1
    Scripting! Python, whatever you like. It doesn't come inside of the box because the only thing that makes sense is for a programmer to say that there was a breaking change. Leaving versioning up to tools is a very lossy proposition. Never worked yet, other than *everything* is incompatible. That's well supported. – Hans Passant Jan 03 '11 at 23:06
  • As mentioned in the accepted answer, this is a duplicate of http://stackoverflow.com/questions/284258/how-do-i-set-the-version-information-for-an-existing-exe-dll – CoderDennis Feb 19 '14 at 14:40

2 Answers2

2

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...

Community
  • 1
  • 1
xt1
  • 408
  • 3
  • 11
0

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.

Ken White
  • 117,855
  • 13
  • 197
  • 405
  • Thanks I know about the VERSIONINFO resources... however I find them a pain to update for multiple modules with each build. I was hoping that they would be stored in a consistent location in binaries that would allow other tools to modify them after the binary has already been compiled/linked. – theycallmemorty Jan 03 '11 at 21:36