rcedit
rcedit copied to clipboard
doesn't work with .NET exe/dll files
i have tested with several files written in c# - this tool just removes all strings from such files, leaving only VersionInfo binary block.
I'm having this problem, too. I've been trying to figure out why this is happening and fix it as well.
I think the problem is with serializing the data to be written out. There seem to be false assumptions being made in ResourceUpdater::SerializeVersionInfo regarding the order of values in the VersionStampValues reference that is passed into the method. Specifically, the method assumes that the StringFileInfo always comes before VarFileInfo, whereas in the .NET executable I tried it with, VarFileInfo comes before StringFileInfo, so the serialization method messes up.
Fixed by #26 and released in 0.6.0
.
I don't think this is 100% fixed. It no longer clears everything out when setting the icon but it does still clear out any previous file description when only setting the icon.
@smbecker can you provide the command you are running?
I am using the programmatic API
rcedit(exePath, {
icon: iconPath
}, cb);
@smbecker Did you ever resolve your issue? I can't reproduce it.
This is what I tried:
I created a very simple .rc
file with version information in it which includes a file description. I also included a string table entry for good measure. I compiled it with the standard Windows resource compiler. I added it to a .NET executable by compiling a very simple C# program with /win32res:<file>
. I confirmed that the file description was present in the file via https://github.com/katahiromz/RisohEditor. I created a Node.js project, installed rcedit
via npm
, and then added an .ico
file to that executable with the programmatic API. After examining the executable with RisohEditor again, I see that all of the icons are added. However, the file description in the version information and the string table remain intact.
Is this a valid way to test the issue? If not, can you provide more details? For example, alternate steps or a link to a project which suffered from the issue.
Thank you!