如何使用mt.exe将清单添加到可执行文件? [英] How do I add a manifest to an executable using mt.exe?
本文介绍了如何使用mt.exe将清单添加到可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用Windows SDK中的mt.exe使用以下命令行将清单添加到没有清单的可执行文件中:
I'm trying to use mt.exe from the Windows SDK to add a manifest to an executable file that doesn't have one, using the following command line:
C:\winsdk61>mt.exe -nologo -manifest "r:\shared\hl.exe.manifest" -updateresource:"r:\shared\hl33m.exe;#1"
不幸的是,当我这样做时,出现此错误:
Unfortunately, when I do, I get this error:
mt.exe : general error c101008c: Failed to read the manifest from
the resource of file "r:\shared\hl33m.exe". The specified resource
type cannot be found in the image file.
当然在文件中找不到资源-该文件没有清单,这就是为什么我要添加一个清单.
Of course the resource wasn't found in the file - the file doesn't have a manifest, that's why I want to add one.
如何将清单附加到可执行文件?这不简单吗?
How can I append a manifest to an executable file? Shouldn't this be simple?
推荐答案
您应使用/outputresource 而不是/updateresource:.
正确的命令行为:
mt.exe -nologo -manifest "r:\shared\hl.exe.manifest" -outputresource:"r:\shared\hl33m.exe;#1"
这篇关于如何使用mt.exe将清单添加到可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文