2

I want to add a variable length userdata to my exe. For example I don't want to change the build version everytime i hand a quick test for someone to look at. I'd like to add the git/mercurial branch info and maybe build options if i don't have build options stored/available in the exe. This way i can put the exe in a util and get data i need.

Would adding extra data to the end of an exe be ok? It would be a windows C++ exe build with visual studios or gcc or it may be a .NET application

  • Exe can have meta data thats viewable from properties and mouseover-popup: http://stackoverflow.com/questions/284258/how-do-i-set-the-version-information-for-an-existing-exe-dll – Imre L Aug 15 '12 at 21:34
  • @ImreL that looks like a fixed set of information –  Aug 15 '12 at 21:38

1 Answers1

1

Some virus checkers will probably trigger on this sort of thing (either on your own machine if you have one, or possibly on the target machine).

Another approach is to keep a (manual or automatic) log of the SHA1 of executables that you send people. Then, you can see what exact version somebody is running by calculating the SHA1 of their executable and comparing it to the entries in your log.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • I didn't think about viruses but I did think about this as an alternative solution. –  Aug 15 '12 at 21:27
  • 1
    Many installers add data at the end of their installer runtimes to store installation data, so adding data to end of executables is very commonplace. Other examples include games made with certain commercial game engines. Plus Authenticode signatures aren't technically a part of the EXE as a PE section. There's something wrong with an AV software if it triggers merely on the presence of extra data on end of EXEs. – cyanic Jan 02 '15 at 18:13