views:

4151

answers:

3

I need to build an old VB6 application with a version number where the 4th digit is greater than 9999, for example, version 1.2.0.10003. VB6 won't let you do this; the build fails.

The current workaround is to build version 1.2.0.9999 and then manually edit the file in Visual Studio to insert the correct version. There must be a better way. Is there a command-line tool that allows you to modify the version number fields of an EXE or DLL? Preferably a way that allows you to edit specific version number fields individually.

+3  A: 

ChangeVersion (and others) taken from:

http://stackoverflow.com/questions/284258/how-do-i-set-the-version-information-for-an-existing-exe-dll

Tim
It would be nice to find a free tool - call me a cheapskate if you like
MarkJ
It can't be that hard to write - just a resource editor with a GUI for version numbering. But, given the cost of the tool and the amount of time to spend on writing your own, it's probably worth it... I'll look for a free one.
Tim
+2  A: 

There are a number of tools for editing the version info of a windows executable but I don't think you will need them.

Look here are using resource files in vb http://visualbasic.about.com/od/usevb6/a/ResVB6.htm

And here for info on the version resource http://msdn.microsoft.com/en-us/library/aa381058.aspx

And here for info on the microsoft resource compiler http://msdn.microsoft.com/en-us/library/aa381042(VS.85).aspx

With these two you should be able to disable VB's builtin versioning and use whatever version info you want.

Nevermind, VB6 inserts its own version resource as a post build operation with no way to turn it off. Overwriting the version info in the executable is the only solution.

See http://www.darinhiggins.com/CategoryView,category,Resource%2BFiles.aspx

codeelegance
+1  A: 

Resource Tuner Console

This console resource editor allows creating a reliable and repeatable process for updating Product Version Information resources during the final stage of the build process from the command prompt.

See specifically the batch manipulation of file version information page for greater details:

Wylder