在另一篇关于文件中包含的元数据的文章中,我们展示了如何查看文件的元数据以及如何更改文件或图像等常见文件的元数据。但是可执行文件(.exe、.dll 或 .ocx(.dll or.ocx))中包含的元数据呢?在第三方工具的帮助下,它们的元数据也可以更改。本教程将展示如何。
Windows 程序(Windows Programs)的资源编辑器
如果你想改变任何可执行文件的属性,那么你需要一个资源编辑器(resource editor)。在网络上搜索会发现许多工具,包括免费的和商业的。我推荐的顶级工具是本教程中详细介绍的ResEdit 资源编辑器和(ResEdit Resource Editor)Resource Hacker - 一个使用相同原理的类似工具。
下载并运行(Download and Run)RestEdit资源编辑器(RestEdit Resource Editor)
转到官方ResEdit 资源编辑器(ResEdit Resource Editor)页面并下载适合您的操作系统的(operating system)版本(version appropriate):32 位或 64 位。这个是免费的。
使用7-Zip(7-Zip)或其他知道如何使用7z格式的文件存档器(file archiver)提取存档的内容。
然后,以管理员身份运行该工具(右键单击并选择“以管理员身份运行”("Run as administrator"))。如果没有,当您尝试修改存储在可执行文件中的数据时,该工具可能会停止响应并且不会保存您的更改。
当您打开ResEdit 资源编辑器(ResEdit Resource Editor)时,它的窗口非常空,只有几个活动按钮。
打开可执行文件并修改(Modify)其元数据(Metadata)
启动ResEdit(ResEdit)后,打开要更改其属性的可执行文件。
注意:(NOTE:) 在(Prior)对文件进行任何更改之前,最好对其进行备份(backup copy),以防万一(case something)出现问题。
打开选定的可执行文件后,您会在“资源(Resources)”部分看到许多条目。这些条目因文件而异,它们的名称和编号(name and number)也不同。
可执行文件的元数据始终位于列表底部名为Version Information的文件夹中,位于名为(Version Information)1的条目中。点击它。
右侧显示了可执行文件的元数据。在这里,您可以单击任何值并将其更改为您喜欢的值。显示的字段是可编辑的。
完成后,按保存(Save)按钮覆盖文件的元数据。
还可以编辑哪些其他内容?
使用ResEdit 资源编辑器(ResEdit Resource Editor),您可以更改文件的许多其他方面。例如,您可以编辑和更改其中存储的图标或其某些菜单和对话窗口(menus and dialogue windows)。
可以编辑的内容数量差异很大,具体取决于每个可执行文件的创建方式以及ResEdit 资源编辑器(ResEdit Resource Editor)可以解码哪些数据。
如果您想试验和更改文件的其他方面(元数据除外),我强烈建议您首先阅读ResEdit 帮助文档(ResEdit help documentation)并制作备份副本。
结论
从本教程中可以看出,使用ResEdit 资源编辑器(ResEdit Resource Editor)编辑文件的元数据相对容易。如需更多有趣的提示和技巧,请不要犹豫,阅读下面推荐的文章。
How to Change the Metadata Stored in Executable Files in Windows
In another article аbout the metadata included in files, we showed how to view а file's metadata and how to change it for common files such as documents or images. But what about the metadata included with exеcutable files (.exe,.dll or.ocx)? With the help of third party tools, their metadata too can be changed. This tutorial will shоw how.
Resource Editors for Windows Programs
If you want to change the properties of any executable file, then you need a resource editor. A search on the web will reveal many tools, both free and commercial. The top tools I recommend are the ResEdit Resource Editor covered in detail in this tutorial and Resource Hacker - a similar tool that functions using the same principles.
Download and Run the RestEdit Resource Editor
Go to the official ResEdit Resource Editor page and download the version appropriate for your operating system: 32-bit or 64-bit. It is free of charge.
Extract the content of the archive using 7-Zip or another file archiver that knows how to work with the 7z format.
Then, run the tool as administrator (right-click and select "Run as administrator"). If not, when you try to modify the data stored in an executable file, it is likely that the tool will stop responding and not save your changes.
When you open the ResEdit Resource Editor, its window is pretty empty and has only a few active buttons.
Open an Executable and Modify Its Metadata
Once ResEdit is launched, open the executable whose properties you want changed.
NOTE: Prior to making any changes to the file, it is best to make a backup copy of it, which can be used in case something goes wrong.
Once the selected executable is opened, you see lots of entries in the Resources section. These entries are different from file to file, as well as their name and number.
The metadata of the executable is always found in a folder called Version Information at the bottom of the list, in an entry named 1. Click on it.
On the right, the metadata of the executable file is revealed. Here, you can click on any value and change it to your liking. The fields being displayed are editable.
Once this is done, press the Save button to overwrite the metadata of the file.
What Other Things Can Be Edited?
With the ResEdit Resource Editor you can change many other aspects of a file. For example, you can edit and change the icons stored in it or some of its menus and dialogue windows.
The number of things that can be edited varies greatly, depending on how each executable was created and what data can be decoded by the ResEdit Resource Editor.
If you want to experiment and change other aspects of a file, except its metadata, I strongly recommend that you first read the ResEdit help documentation and make backup copies.
Conclusion
As you can see from this tutorial, using the ResEdit Resource Editor to edit a file's metadata is relatively easy. For more interesting tips and tricks, don't hesitate to read the articles recommended below.