rcedit是一个命令行工具,设置exe的资源:https://github.com/electron/rcedit,可以用Visual Studio编译,或直接在release里下载构建好的exe。
使用:
注意:设置图标时,图片文件必须是ico格式。否则报错:Reserved header is not 0 or image type is not icon for ‘X’
Fatal error: Unable to set icon
原文件图标:
修改后:(修改后,文件夹的图标没有立即显示。可以剪切换个位置就显示出来了。)
再次打开:
帮助:
C:\Users\Administrator\Downloads>rcedit-x64.exe
Rcedit v0.2.0: Edit resources of exe.
Usage: rcedit <filename> [options...]
Options:
-h, --help Show this message
--set-version-string <key> <value> Set version string
--get-version-string <key> Print version string
--set-file-version <version> Set FileVersion
--set-product-version <version> Set ProductVersion
--set-icon <path-to-icon> Set file icon
--set-requested-execution-level <level> Pass nothing to see usage
--application-manifest <path-to-file> Set manifest file
--set-resource-string <key> <value> Set resource string
--get-resource-string <key>