Changing "Publisher" information for a ".exe" file

You can easily change the publisher, either when linking/compiling by setting the appropriate resources for your project (e.g. CompanyName), or modifying the resources with a resource editor.

Your problem is really that there is no signature, so even if a publisher field is present it cannot be trusted.

You can find an example resource rc file near the end of http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058%28v=vs.85%29.aspx.

To add resources to your VC project check:

  • How do I embed version information into a windows binary?
  • VC++ 2012: How to include version info from version.inc (maintained separately) into the .rc file

The .rc file(s) will be compiled to binary (.res) and linked into your final executable.

To add or modify an existing executable, you should be able to use this tool (login required, this will cause the signature to be invalid in an already signed binary of course).

The Microsoft Authenticode documentation includes tutorials.

CAcert.org will sign a certificate you can use, and have instructions for getting started with Authenticode.

Sorry I can't be more helpful with VC, I don't use it, I usually using mingw and make, from some time ago targetting win32:

  1. given a VERSIONINFO in a text version.rc file use mingw32-windres to compile it to a .o file (I actually had a bunch of .rc files, they were each #include-d in a single resources.rc so I only needed to run windres on that single file, and link a single extra object file)
  2. include that version.o (or combined resources.o) in the final CC command, assuming compile and link to executable in one step
  3. I also included -lversion when linking, AFAIR this was just because I used GetFileVersionInfo() for the code to check and display its own version in the 'About' dialog.

Tags:

Publisher