Changing VERSIONINFO resources for different builds

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I am compiling a program with eMbedded VC++ 3 for a PocketPC 2000 / 2002
target, and with eMbedded VC++ 4 for a PocketPC 2003 target. I would
like to be able to tell the executables apart.

What I tried:
I have edited my .rc file like this: in the VERSIONINFO define there was
a FileDescription like this:

VALUE "FileDescription", "My Program\0"

which I replaced with code like this:

VALUE "FileDescription", "My Program -- "
#if defined ISOLDPOCKETPC
"PocketPC 2000 / 2002 build"
#elif defined ISPOCKETPC2003
"PocketPC 2003 build"
#else
"Unknown build"
#endif
"\0"

ISOLDPOCKETPC is defined in the Preprocessor definitions for both C++
and Resources in the eVC3 project, and ISPOCKETPC2003 in eVC4.

Now, this works -- I can right-click the executable and look at
Properties, and I see the build.

But if I edit the properties using the IDE, say to change the version
number, all this #if stuff is lost, replaced by

VALUE "FileDescription", "My Program -- Unknown build\0"

This is not unreasonable on the part of the resource editor. But is
there any way of stopping this from happening, or a better way of
marking the .exes for identification?

I can have the build displayed on the About screen of the program, but
that is not a solution. To see the about screen I have to copy the
program onto a hand-held running the correct OS, and the purpose is to
find out what the correct OS is. That is why I would like to be able to
distinguish between the .exes on the PC, before running them.

Thanks

Frank



.



Relevant Pages