1

I want to modify the version info of a compiled exe to change the description.

I looked at it a bit myself and figured out I need to use the UpdateRessource function, and I got this far.

LPBYTE lpBuffer = new BYTE[200];
UpdateResource(filehandle, 
    RT_VERSION, 
    MAKEINTRESOURCE(1), 
    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 
    (LPVOID) lpBuffer, 
    sizeof(lpBuffer)

The part I can't quite figure out is the lpBuffer. I only want to change the part of the ressource containing the file description.

My guess is that I'd have to load the old version from the exe and modify it a bit, but I'm not quite sure how it's structured.

Mat
  • 202,337
  • 40
  • 393
  • 406
user818205
  • 51
  • 1
  • 4
  • see this thread? There is a tool called ChangedVersion. http://stackoverflow.com/questions/284258/how-do-i-set-the-version-information-for-an-existing-exe-dll – taocp Mar 17 '13 at 14:09
  • Do you need to do this programatically? Why not use one of the many resource editors? – David Heffernan Mar 17 '13 at 14:10
  • I do need to do this programatically. – user818205 Mar 17 '13 at 14:13
  • 2
    If you're thinking of doing this on anything that Authenticode-signed and you don't have access to the original signing certificate, think again. – WhozCraig Mar 17 '13 at 14:18

0 Answers0