title: appending data to an exe
body: <p>This question extensions from one of the answers to my earlier question: <a href="https://stackoverflow.com/questions/5792793/how-to-save-user-registration-in-the-exe-c/5792913#5792913">how to save user registration in the exe... (C#)</a>.</p>
  
  <p>The idea itself is still very new to me, but it seems plausible.  My first attempt of simply appending a string to the exe from inside a different application didn't work.  Then got a little smarter and tried appending bytes.  Still no luck.  </p>
  
  <p>I've found various documentations on Windows Portable Executable files:</p>
  
  <p><a href="http://en.wikipedia.org/wiki/Portable_Executable" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Portable_Executable</a></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/magazine/bb985997.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/magazine/bb985997.aspx</a></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/windows/hardware/gg463125" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/windows/hardware/gg463125</a></p>
  
  <p>Frankly, I understand so little that they're not of much use to me.  Of more use I was able to find a delphi tutorial that describes the idea of adding a "payload" to the executable.  It goes on to say that to do this, you need to let the exe know and also be able to track where you put it... or something to that effect.  I have no knowledge of delphi other than what I can guess from the code itself.  <a href="http://www.delphidabbler.com/articles?article=7&amp;part=2" rel="nofollow noreferrer">http://www.delphidabbler.com/articles?article=7&amp;part=2</a></p>
  
  <p>What would be most useful is just an example or a link of how to add and retrieve a short piece of information onto the executable.  I am going to want to have this operation performed on a C# Forms Application from a linux server ran as a php script.. I figure a standalone C++ application which accepts information as arguments should be able to do the trick.</p>
  
  <p>I am open to other ideas, too.</p>
  
  <p>Thank you.</p>