Posterous theme by Cory Watilo

Stamping Versions

Ok, well, this isn't the most likely thing you'll need to do today, but I needed to put a four-place version number on an executable built with VB6.  Unfortunately, VB6 only used three of the four place-numbers for versions.  I've been looking for a solution to this for a while, and thought I had one when I came across vbAdvance, but unfortunately vbAdvance only seems to work while you are in the IDE.  Invoking the IDE to make from the command line won't load and use vbAdvance's versioning, even when you tick the optional "command-line" box in the add-in page.

There are a number of resource editors out there that will change executable properties after the compilation step, but they are either commercial, complicated or not command-line.

I finally ran across a simple command-line freeware tool to do just this one thing, called stampver.  You can find it discussed at http://www.codeguru.com/tools/standalonetools/article.php/c1403.  It seems to be doing the trick perfectly, so far.  I'm a little anxious about fussing with a file after compilation, but I don't have any other good options at the moment.

The two things to note about stampver: First, it stamps the file and product version attributes separately, so I've had to run it twice on each file, one for each.  Second, the version stamped can be no more places than the string already compiled into the executable.  This means you need to set extra places in a three-place version if you want space for four places after it has been compiled.  I did this by setting all three places to '9999'.