There are many ways to do this.

Would it work to use macros (#defines) that are set to the variable information? I am not sure but that would be easy enough to try.

Also, note that the ".rc2" file is provided for you to use as you need to. Perhaps the version information could be put there and generated or something like that.