On 9/29/2015 11:26 AM, Mark Ludwig
wrote:
I just
want to point out that it's not necessary to rebuild Emacs in
order to change the embedded manifest. You just need the tools
and the target executable. You can extract the current manifest
to a text file. After changing or adding what you want to the
text file, you can update the embedded manifest in the target
executable.
Something like:
mt -inputresource:emacs.exe;#1 -out:extracted.manifest
... edit extracted.manifest ...
mt -updateresource:emacs.exe;#1 -manifest extracted.manifest
Note that the syntax of mt is inconsistent w.r.t. whether there is
a space or colon after the option. See the docs for details.
(Sorry, but I have no idea whether adding Windows 10 as a
supported OS will help with the problem.)
Hope this helps,
Mark
I copied mt.exe and the 24.5.1 emacs.exe to the desktop on my
Windows 8.1 computer. Observe result:
C:\Users\HP\Desktop>mt
-inputresource:emacs.exe;#1 -out:emacs.manifest
C:\Users\HP\Desktop>mt -updateresource:emacs.exe;#1
-manifest emacs.manifest
invalid value for uiAccess in string: level="asInvoker"/
invalid value for uiAccess in string: level="asInvoker"/
Here is what the file looked
like after I edited it:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"/>
</dependentAssembly>
</dependency>
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="emacs" type="win32"/>
<description>GNU Emacs</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility
xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 8.1 -->
<supportedOS
Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows Vista -->
<supportedOS
Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS
Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS
Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 10 -->
<supportedOS
Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>
However, the "invalid value for uiAccess"
error occurred whether I edited the file or not.
I have no idea what string I should try to pass in the manifest file
instead of "asInvoker".
There were additional complications. I tried it first on my Windows
8.1 desktop with the 24.3.1 emacs.exe I have installed there. It
turns out that its manifest does not even have OS compatibility
indicators (just "win32"); so, at first, I thought the whole thing
might be irrelevant. Then it occurred to me that maybe 24.5.1 was
different. However, I could not get mt.exe to work on Windows 10.
It complained about 2 missing DLLs. I secured those, and then it
was complaining about something else; so I gave up and copied the
24.5.1 emacs.exe to the desktop on my Windows 8.1 machine. And, as
it turns out and much to my surprise, it does have the OS
compatibility indicators. But then the update of the manifest
failed anyway. (The failed update leaves the manifest in a
corrupted state.)
Any more ideas?
Regards,
David V.