I had similar problems. Through trial and error I figured out that the location 
in the resulting .exe file for storage of the icon and file details is limited.

The icon I was using was too large and was overwriting the details resulting in 
a corrupted .exe.

The solution was to use a smaller icon (16x16 32bit) and limit the length of 
the detail fields.

I use the Perl module Win32::Exe to modify the file icon and details instead of 
a third party utility.

I haven't done the research to figure out the size limitations. Now when I have 
a problem it is due to a detail field being too long so I shorten it till it 
works.

If anyone on the list knows the exact size limits for the icon and detail 
fields please share the information.

keith

-- 

Keith R. Watson                        Georgia Institute of Technology
Information Security Engineer Lead     College of Computing
keith.wat...@cc.gatech.edu             801 Atlantic Drive NW
(404) 385-7401                         Atlanta, GA 30332-0280


> -----Original Message-----
> From: Kevin Walzer [mailto:k...@codebykevin.com]
> Sent: Thursday, October 29, 2015 18:55
> To: par@perl.org
> Subject: Edit version resources in exe
> 
> I am trying to modify a pp-wrapped exe on Windows to use a custom icon
> and custom version information. I'm aware that support for this has been
> dropped from par/pp, so I have been using other tools. After carefully
> constructing an icon in Gimp to include a 16 and 32-pixel image in 256
> colors, as documented in the list archives and at SO, I have gotten the
> icon replaced without issue.
> 
> The remaining issue is the version information. Changing the version
> information in any form whatsoever results in the endless array of
> garbage "bad signature" error messages coming up when the app
> launches--a terrible user experience. Is there any way to change the
> information to avoid these errors? I've been using Resource Hacker and
> verpatch like so:
> 
> ::C:\Users\kevin\Desktop\resourcehacker\ResourceHacker.exe -modify
> "FileMorph.exe",
> "FileMorph.exe", "filemorph.ico", ICONGROUP, WINEXE, 0
> 
> C:\Users\kevin\Desktop\resourcehacker\ResourceHacker.exe -delete
> FileMorph.exe,
> FileMorph.exe, versioninfo, 1, 1033
> 
> set VERSION="2.5.0.0 (%date%)"
> set FILEDESCR=/s desc "File modification tool"
> set COMPINFO=/s company "WordTech Communications LLC" /s (c) "(c) 2015"
> set PRODINFO=/s product "FileMorph" /pv "2.5.0.0"
> 
> "verpatch.exe" /va /langid 1033 FileMorph.exe %VERSION% %FILEDESCR%
> %COMPINFO% %PRODINFO%
> 
> This approach follows the same approach as the icon replacement,
> ovewriting the version data at the same ID point in the exe. However, it
> still triggers the bad signature spew.
> 
> So I'm a bit stuck as to how to proceed. Has anyone found a way to do
> this without these errors? exe_update, some other process?
> 
> 
> Thanks,
> Kevin
> 
> --
> Kevin Walzer
> Code by Kevin/Mobile Code by Kevin
> http://www.codebykevin.com
> http://www.wtmobilesoftware.com

Reply via email to