qt 修改.exe文件图标

We’ve previously shown you how to modify the icon on an .EXE file, but if you’ve tried this you might find out that some apps and programs give you an error that says “This file has a non-standard resource layout… it has probably been compressed with an “EXE compressor”. Here’s how to fix it.

我们之前已经向您展示了如何修改.EXE文件上的图标,但是,如果您尝试过此操作,则可能会发现某些应用程序和程序给您一个错误,指出“此文件具有非标准的资源布局…”。它可能已使用“ EXE压缩器”进行了压缩。 解决方法如下。

In this tutorial I’ll show you how to decompress such files and I’ll show you another program you can use to modify the icons. For my example I will use my all time favorite program Irfanview.

在本教程中,我将向您展示如何解压缩此类文件,并向您展示另一个可用于修改图标的程序。 对于我的示例,我将使用我一直喜欢的程序Irfanview 。

This guest article was written by forum member Sarah James

这篇客座文章由论坛成员Sarah James撰写

如何修改压缩的.EXE文件上的图标(How to Modify Icons on Compressed .EXE Files)

Irfanview is a wonderfull little imageviewer with lots and lots of options, but since it has been around ever since Win98 it’s icons look rather outdated. To change the look of the program itself is easy. Just select another skin and you have another – more modern looking – toolbar, like the gorgeous Windows 7 style toolbar you can download here.

Irfanview是一个很棒的小型imageviewer,具有很多选项,但是自Win98以来它就已经存在了,它的图标看起来已经过时了。 更改程序本身的外观很容易。 只需选择另一种皮肤,您将拥有另一个(外观更现代)工具栏,例如可以在此处下载华丽的Windows 7样式的工具栏。

So you go from this:

所以你从这里开始:

To this

对此

But you’re still stuck with the old program icon. Yuk.

但是您仍然会停留在旧程序图标上。 育。

And even worse: you can create lovely screensavers with Irfanview, as I’ve described here, but they also have an ugly 32×32 pixelicon. Now that just won’t do.

更糟糕的是:您可以使用Irfanview创建漂亮的屏幕保护程序,如我在此处所述,但它们也具有丑陋的32×32 pixelicon。 现在那样就不行了。

Actually I’ve been wanting to change these icons (and a lot of others of compressed files) for a long time, but was unable to, because I couldn’t unpack the exe. A big thanks goes to Phew on the Irfanview Forum. Without him I never would have thought of UPX.

实际上,我很久以来一直想更改这些图标(以及许多其他压缩文件),但由于我无法解压缩exe文件而无法更改。 非常感谢Irfanview论坛上的Phew 。 没有他,我将永远不会想到UPX。

您需要的工具 (The Tools You Need)

There are ways to change the icons, using icoFX or ResHack and an unpacker called UPX. I prefer to use IcoFX for this over ResHack ánd I prefer to use the last freeware version.

可以使用icoFX或ResHack和称为UPX的解包器来更改图标。 与ResHack相比,我更喜欢使用IcoFX。我更喜欢使用最新的免费版本。

IcoFX has lately become shareware with lots and lots of options. Very nice if you want to draw your own icons and cursors, but for me it feels like overkill. If I want to draw an icon I prefer to use an image editor like the gimp or paintshop pro.

IcoFX最近已成为具有很多选择的共享软件。 如果您想绘制自己的图标和光标,这非常好,但是对我来说,这感觉太过激了。 如果要绘制图标,我更喜欢使用图像编辑器(例如gimp或paintshop pro)。

You can use the new IcoFX2 15 times and then the save function is disabled. Which is long enough if you just want to use it for this tutorial and it will give you a feel of the program. There is however an older version 1.6.4. that is freeware. You can still find it on Filehippo and it works perfectly fine. There is also a portable version 1.6.4. here.

您可以使用新的IcoFX2 15次,然后禁用保存功能。 如果您只想在本教程中使用它,那么它足够长,它可以使您对该程序有所了解。 但是,有一个较旧的版本1.6.4。 那是免费软件。 您仍然可以在Filehippo上找到它,并且效果很好。 还有一个便携式版本1.6.4。 在这里。

You also need some nice icons.

您还需要一些漂亮的图标。

For the exe there is an excellent replacement Icon IrfanView by ~ncrow.

对于exe, 〜ncrow有一个很好的替代Icon IrfanView 。

For the screensavers it is a matter of taste, I chose one of the icons from  Another Monitor Dock Icons by MediaDesign

对于屏幕保护程序来说,这只是一个问题,我从MediaDesign的“另一个监视器底座”图标中选择了一个图标

And with that png template he includes you can even make your own :)

并且使用该png模板,他甚至可以制作自己的:)

使用UPX和命令提示符 (Using UPX and the command prompt)

UPX is a command prompt utility. On how to work with the command prompt have a look here. And I like to be able to use the command prompt in the folder I’m working at that moment, without having to manually search for my folder within the command prompt, so I use this.

UPX是命令提示符实用程序。 有关如何使用命令提示符的信息,请在此处查看。 而且我希望能够在当时正在使用的文件夹中使用命令提示符,而不必在命令提示符中手动搜索我的文件夹,所以我使用this 。

So instead of having to go from C:\Users\Sarah\ to D:\Irfanview Project I directly open my command prompt in D:\Irfanview Project.

因此,不必从C:\ Users \ Sarah \转到D:\ Irfanview项目,而是直接在D:\ Irfanview项目中打开命令提示符。

Neat huh?

整洁吗?

To install UPX rightclick upx.exe, choose Run as administrator and a command window will flash by. You might need to restart your computer for it to work.

要安装UPX,请右键单击upx.exe,选择“以管理员身份运行”,一个命令窗口将闪过。 您可能需要重新启动计算机才能运行。

Now you are set to start unpacking I_view.exe and Slideshow.exe. First browse to the program folder of Irfanview by default C:\Program Files\Irfanview. Copy I_view.exe to your working folder. Mine is called Irfanview Project. Then browse to C:\Program Files\Irfanview\Plugins and copy Slideshow.exe to your working folder. Create a new folder in your working folder and call it Icons. Right-click on this folder and choose Command Prompt Window here.

现在,您已准备好开始解压缩I_view.exe和Slideshow.exe。 默认情况下,首先浏览到Irfanview的程序文件夹C:\ Program Files \ Irfanview。 将I_view.exe复制到您的工作文件夹中。 该矿被称为Irfanview项目。 然后浏览到C:\ Program Files \ Irfanview \ Plugins,然后将Slideshow.exe复制到您的工作文件夹中。 在工作文件夹中创建一个新文件夹,并将其命名为图标。 右键单击此文件夹,然后在此处选择“命令提示符窗口”。

In the command prompt window you type upx -d i_view32.exe.

在命令提示符窗口中,键入upx -d i_view32.exe。

Hit the key Enter on your keyboard and the exe will be unpacked.

按下键盘上的Enter键,该exe文件将被解压缩。

Do the same for Slideshow.exe.

对Slideshow.exe执行相同的操作。

编辑图标 (Editing the icons)

Next copy the png files you want to use as icons to the folder Icons and open IcoFX. In this tutorial I use IcoFX 1.6.4.  I prefer to convert the png files to icons myself, so I can choose what formats I want, but you can also use the ico files.

接下来,将要用作图标的png文件复制到文件夹Icons中,然后打开IcoFX。 在本教程中,我使用IcoFX 1.6.4。 我更喜欢自己将png文件转换为图标,因此我可以选择所需的格式,但也可以使用ico文件。

Go to Tools > Batch Process…

转到工具>批处理...

There you will be presented with a host of options. Make sure Create icons from Images is ticked. Next use the add button to add the png files you want to convert to icons. Below that are a lot of image formats. I generally choose only XP colors ánd I make sure 128×128 is ticked.

在那里,您将看到许多选项。 确保从图像创建图标被打勾。 接下来,使用添加按钮添加要转换为图标的png文件。 在此之下是许多图像格式。 我通常只选择XP颜色,并确保已勾选128×128。

Without the 128×128 format the icons will show as 48×48 in Vista when you choose ‘Large Icons’ in explorer.

如果没有128×128格式,则在资源管理器中选择“大图标”时,在Vista中图标将显示为48×48。

I don’t tick the 256 and 16 colors, since I only use my icons on Vista or 7, but for maximum usability you can tick the others too. It will make your icon file a bit larger, but since size is not a problem these days you can afford to indulge :)

我不会在256和16色上打勾,因为我仅在Vista或7上使用我的图标,但是为了获得最大的可用性,您也可以打勾其他颜色。 它将使您的图标文件大一些,但是由于这些天的大小不再是问题,因此您可以放纵:)

Hit OK and in a few seconds you have two suitable icons to work with.

单击确定,然后在几秒钟内您可以使用两个合适的图标。

插入图标 (Inserting the icons)

Now we are finally ready to change the icons in the program itself.

现在,我们终于可以更改程序本身中的图标了。

Go to Tools > Resource Editor …

转到工具>资源编辑器...

This will open an empty window like this:

这将打开一个空窗口,如下所示:

Use the yellow open file icon to browse to i_view32.exe in your working folder and click Open. Now you can see all the icons that are stored within the exe. You can change all of them, but for the purpose of this tutorial we only do the first one.

使用黄色的打开文件图标浏览到工作文件夹中的i_view32.exe,然后单击“打开”。 现在,您可以看到exe中存储的所有图标。 您可以更改所有它们,但是出于本教程的目的,我们仅做第一个。

As a sidenote: Irfanview also has it’s file icons stored in Icons.dll which you find in the plugins folder. You can also change all those icons to the ones you like!

附带说明:Irfanview的文件图标也存储在Icons.dll中,您可以在plugins文件夹中找到该图标。 您也可以将所有这些图标更改为自己喜欢的图标!

Right-click on the first icon and select Change.

右键单击第一个图标,然后选择更改。

Browse to your icon and click Open.

浏览到您的图标,然后单击“打开”。

Voila there is your new icon.

瞧,有您的新图标。

Click the blue save button.

点击蓝色的保存按钮。

And if all went allright you should see File saved successfully!

如果一切顺利,您应该会看到文件成功保存!

Click OK.

单击确定。

Repeat the procedure for Slideshow.exe.

对Slideshow.exe重复该过程。

And then you can take a look at your working folder.

然后,您可以查看您的工作文件夹。

You now have the exe files with the new icons and the old ones have automatically been backed up with the extension .bak added to their name. I have given bak files a black recycle bin icon – you probably see a generic icon and the extension .bak after the name.

现在,您将带有带有新图标的exe文件,而旧文件将自动备份,并在文件名中添加扩展名.bak。 我给bak文件一个黑色的回收站图标-您可能会在名称后看到一个通用图标和扩展名.bak。

Sometimes you don’t see the new icons, because Windows keeps the old image in it’s cache. A restart generally fixes that, so don’t worry about it at this point.

有时您看不到新图标,因为Windows将旧图像保留在缓存中。 重新启动通常可以解决该问题,因此现在不必担心。

可选:打包exe (Optional: packing the exe)

If you like to save space you can now repack the exe files. Open the command prompt in your working folder and type upx i_view32.exe.  For the slideshow you use upx slideshow.exe

如果您想节省空间,现在可以重新打包exe文件。 在您的工作文件夹中打开命令提示符,然后键入upx i_view32.exe。 对于幻灯片,请使用upx slideshow.exe

Now copy i_view32.exe and slideshow.exe to the Irfanview program folder (replace the old exe files or move them out of the way).

现在,将i_view32.exe和slideshow.exe复制到Irfanview程序文件夹中(替换旧的exe文件或将它们移开)。

测试新图标 (Testing your new icons)

Now we are going to test if newly created screensavers actually have the new slideshow icon. There isn’t much to test on the program icon – you can see that appear in the lefthand corner whenever you open Irfanview. Open Irfanview and then open the slideshow menu by clicking the second button on the left.

现在,我们将测试新创建的屏幕保护程序是否确实具有新的幻灯片图标。 程序图标上没有太多要测试的东西–每当打开Irfanview时,您就会看到它显示在左上角。 打开Irfanview,然后通过单击左侧的第二个按钮打开幻灯片菜单。

You’ll get the last saved slideshow menu you entered. (see this tutorial at 7tutorials for more details)

您将获得最后输入的幻灯片菜单。 (有关更多详细信息,请参见7tutorials上的本教程)

Save the slideshow as screensaver and have a look in the folder where you saved it. It should look like this:

将幻灯片另存为屏幕保护程序,然后在保存幻灯片的文件夹中查看。 它看起来应该像这样:

结论 (Conclusion)

As shown here with a bit of persistence you can even modify older programs to fit the look of Vista and Windows 7 and so keep a superb little program like Irfanview as a modern addition to your system.

如此处所示,您甚至可以修改较旧的程序以适合Vista和Windows 7的外观,并保留一些出色的小程序(如Irfanview)作为系统的现代附件。

Download IrfanView from Ninite

从Ninite下载IrfanView

翻译自: https://www.howtogeek.com/100943/how-to-change-the-icons-on-compressed-.exe-files-without-getting-errors/

qt 修改.exe文件图标

qt 修改.exe文件图标_如何在没有错误的情况下更改压缩的.EXE文件上的图标相关推荐

  1. ssh 远程复制文件_如何在不输入密码的情况下通过SSH远程复制文件

    ssh 远程复制文件 SSH is a lifesaver when you need to remotely manage a computer, but did you know you can ...

  2. 双卡版本不插卡的情况下状态栏中只显示了一个信号图标,而不是两个信号图标,如何修改为2个图标

    JB3开始,双卡版本不插卡的情况下状态栏中只显示了一个信号图标,而不是两个信号图标,如何修改为2个图标 [SOLUTION]   这是JB3 default的设计,如果要恢复两个信号图标,请参考如下方 ...

  3. vue的自定义标签tag是什么意思啊_好好的衣服为什么洗一次就废,服装标签上的图标究竟是什么意思?...

    (图片来源:CNET) 常常有人抱怨衣服没洗几次,就变形掉色.你有没有想过,可能是你清洗方法错了! 衣服上标签不仅仅是成分介绍,它还是衣服的说明书,上面详细地告诉了你该如何保养洗护.而忽略这些图标,则 ...

  4. python解压打开文件过多_让Python在后台自动解压各种压缩文件!

    一.需求描述 编写一个Python程序,每次下载压缩包形式的文件后,自动将内部文件解压到当前文件夹后将压缩包删除,通过本案例可以学到的知识点: os 模块综合应用 glob 模块综合应用 利用 gzi ...

  5. java键盘输入到文件中_在Linux中使用java和javac命令编译运行java文件

    Linux中java和javac使用及注意事项 注意!!!: 前提配置好java的环境变量. 如下图: 配置文件 java命令正常 javac命令正常 关于如何配置java环境变量,请详见: 第一篇: ...

  6. win10屏幕快照快捷键_如何在Windows 8和10中更改默认屏幕快照文件夹的位置

    win10屏幕快照快捷键 Windows redesigned its screenshot feature in Windows 8, and you no longer need to launc ...

  7. python找不到文件数据_在使用python pykitti packag的目录中找不到文件

    我正在使用pykitti包来可视化python中的KITTI数据集.找不到需要的校准文件.它在指定的目录中查找这些校准文件.我指定了它应该在其中查找这些文件的目录.但是,它仍然给我一个错误: File ...

  8. android自定义通知栏图标大小,Android不使用自定义布局情况下实现自定义通知栏图标的方法...

    本文实例讲述了Android不使用自定义布局情况下实现自定义通知栏图标的方法.分享给大家供大家参考,具体如下: 自定义通知栏图标?不是很简单么.自定义布局都不在话下! 是的,有xml布局文件当然一切都 ...

  9. Redis集群CentOS系统配置企业级数据备份方案以及数据恢复的操作(在开启AOF功能下恢复冷备RDB文件数据,保持AOF和RDB双开情况下恢复数据及错误的数据恢复步骤详解)

    1. 设置每小时保存一份 /var/redis/6379/dump.rdb 文件至指定目录(我这边存放在 /usr/local/redis_backup 目录下),并删除48小时前的文件.     为 ...

最新文章

  1. 学计算机专业需要考的证有哪些科目,自考计算机专业的考试科目有哪些?
  2. 一起来开发Android的天气软件(一)——功能规格介绍
  3. java BASE64流 输出图片。
  4. [信息安全] 4.一次性密码 amp;amp;amp;amp; 身份认证三要素
  5. java方法带参数返回值_Java方法中的参数太多,第6部分:方法返回
  6. 【Python】最新Python学习路线(完整详细版,含整套教程)
  7. LeetCode 1480. 一维数组的动态和(前缀和)
  8. excel几个表合成一张_Excel中怎样把多张表格中的数据合并到一张表格中
  9. 吃易消化吸收的东西利于长寿
  10. C++ 常量引用用法
  11. Java学习代码合集
  12. 电子邮件是qq邮箱吗
  13. 如何维持手机电池寿命_教你一招,可以让你的手机电池容量长期维持在峰值,延长电池寿命...
  14. win10设置计算机关机时间,win10怎样固定时间关机_win10怎样设置电脑关机时间设置...
  15. 三坐标检测基础知识之RationalDMIS 2020 ,PC-DMIS 2019 点轮廓度(T值)算法说明
  16. Eclipse替换和查找快捷键
  17. 一文读懂云原生数据湖体系
  18. GB/T 2423.16电工电子产品环境试验第⒉部分:试验方法试验J及导则:长霉
  19. appfog mysql_麻烦隧道我的本地Wordpress安装到appfog上的MySQL数据库
  20. 林长制,林业一张图平台

热门文章

  1. 第二章:python必备基础语法
  2. [二分+最大流]51 Nod——1757 大灾变
  3. 【dgl框架】dgl.metapath_reachable_graph函数解析
  4. 分布式丛林探险系列之 Redis 主从复制模式
  5. 苹果系统无法购买服务器,itunes目前无法处理您的购买怎么解决
  6. 梯度消失\梯度爆炸(Vanishing/exploding gradients)与解决方案
  7. 一种无法用言语表达的爱——父爱
  8. 菜谱分享网站微信小程序开发说明(2)-数据库
  9. 编译原理 —— 知识结构导图
  10. 确定sw1开关信号输入端口_MEMS光学器件— MEMS OXC(光交叉互连开关)