使用Resource Hacker在构建后更改图标 [英] Using Resource Hacker for changing the icon after the build

查看:782
本文介绍了使用Resource Hacker在构建后更改图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题写在几个地方(例如这里 here

This question is written in several places (like here and here).

在第二个问题中,有一条评论说要使用

In the second question there is a comment that says to use

ResHacker.exe -addoverwrite "Project.exe", "Project.exe", "ProgramIcon.ico", ICONGROUP, MAINICON, 0

我也尝试使用 -modify 而不是 -addoverwrite

ResHacker.exe -modify "Project.exe", "Project.exe", "ProgramIcon.ico", ICONGROUP, MAINICON, 0

但结果是一样的。

图标已更改:如果我右键单击exe文件并检查属性我看到图标已更改,但在Windows资源管理器中我仍然看看旧图标。

The icon is changed: if I right click on the exe file and check the properties I see that the icon has been changed, but in Windows Explorer I still see the old icon.

如果我用Resource Hacker打开它(所以不要用它作为命令行工具,而是用普通的GUI工具)我看到了正确的图标打开文件对话框。

If I open it with Resource Hacker (so not using it as command line tool, but as normal GUI tool) I see the correct icon in the "Open file" dialog.

有人可以提出解决方案吗?我试图在Delphi post build事件中使用它。

Can anybody suggest a solution? I am trying to use this in a Delphi post build event.

推荐答案

我怀疑你看到了explorer图标缓存中的图标。

I suspect that you are seeing the icon from explorer's icon cache.

这篇关于使用Resource Hacker在构建后更改图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆