How do I add a manifest file to a compiled exe?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

How do I add a manifest file to a compiled exe?

16 Dec 2015, 12:49

I want to requireAdministrator as well as set dpiAware=true. Apparently I need to set these in a manifest file.

How do I add the manifest to my compiled script?

tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: How do I add a manifest file to a compiled exe?

16 Dec 2015, 14:08

You can use mt.exe: [Download]

Update EXE's manifest with your manifest file.

Code: Select all

mt -manifest input.manifest -updateresource:test.exe
Override the EXE's manifest.

Code: Select all

mt -manifest input.manifest -outputresource:test.exe

The Upcoming Ahk2Exe support adding manifest file:

Code: Select all

;@Ahk2Exe-AddResource *24 input.manifest, 1
Last edited by tmplinshi on 16 Dec 2015, 14:18, edited 5 times in total.
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: How do I add a manifest file to a compiled exe?

16 Dec 2015, 14:08

You should be able to just modify the manifest of your compiled script using Resource Hacker
http://www.angusj.com/resourcehacker/
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: How do I add a manifest file to a compiled exe?

16 Dec 2015, 14:19

Just out of curiosity, what other things can I add to the manifest file that may be of interest?
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: How do I add a manifest file to a compiled exe?

16 Dec 2015, 14:24

TheDewd wrote:Just out of curiosity, what other things can I add to the manifest file that may be of interest?
Using COM dll without registering it. See my post Registration-free COM with Manifest File.
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: How do I add a manifest file to a compiled exe?

16 Dec 2015, 15:33

TheDewd wrote:You should be able to just modify the manifest of your compiled script using Resource Hacker
http://www.angusj.com/resourcehacker/
Resource Hacker doesn't let you edit. It only allows me to export, and then replace. I did that, and now the exe won't run. Windows is saying its corrupt

guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: How do I add a manifest file to a compiled exe?

16 Dec 2015, 19:28

Even with mt.exe i can't seem to get a manifest that does not corrupt the exe

guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: How do I add a manifest file to a compiled exe?

17 Dec 2015, 09:39

this worked for me:

Code: Select all

mt.exe -inputresource:application_name.exe;#1 -out:extracted.manifest
mt.exe -manifest extracted.manifest NEW.manifest -out:merged.manifest
then using HkC to add the resource to my compiled AHK Basic script

eladkarako
Posts: 4
Joined: 22 Sep 2017, 19:21
Contact:

Re: How do I add a manifest file to a compiled exe?

22 Sep 2017, 19:47

Download https://github.com/eladkarako/manifest , and drag&drop your exe/dll over `add_manifest.cmd`.

Includes few manifest files, the one used
by default is `generic.manifest`,
it has Win10 support/high-DPI/GDI+ text-scale/...

includes `mt.exe` from Windows SDK 7.1 (32/64bit).
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: How do I add a manifest file to a compiled exe?

23 Sep 2017, 02:05

eladkarako wrote:Download https://github.com/eladkarako/manifest , and drag&drop your exe/dll over `add_manifest.cmd`.

Includes few manifest files, the one used
by default is `generic.manifest`,
it has Win10 support/high-DPI/GDI+ text-scale/...

includes `mt.exe` from Windows SDK 7.1 (32/64bit).
:thumbup: BTW, you have an impressive archive of software/code at github :o

[off topic]

Question: are these Chrome Commandline Switches (those you've posted [here] easy accessible via AHK? Thx 4 listening.

[/off topic]
:)
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: How do I add a manifest file to a compiled exe?

08 Oct 2017, 00:07

eladkarako wrote:Download https://github.com/eladkarako/manifest , and drag&drop your exe/dll over `add_manifest.cmd`.

Includes few manifest files, the one used
by default is `generic.manifest`,
it has Win10 support/high-DPI/GDI+ text-scale/...

includes `mt.exe` from Windows SDK 7.1 (32/64bit).
very nice, thanks


Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mmflume, scriptor2016, ShatterCoder and 106 guests