Re: Manifests and requestedExecutionLevel
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:cd3793tke1l13aop632fgtdad02fncsrvf@4ax.com...
Yes, I have seen that article, but it is completely useless. It talks
about gaining
administrator rights, but that does not appear to be the same as asking
for a specific
integrity level
Yes, as I said:
Kenny's article above makes it seem impossible to use a manifest to specify
a medium MIC. This will be the default for standard users but not for
Admin
users (which will be High by default).
To put it bluntly, I know of no way to use manifests to launch a process
with a guaranteed MIC of Medium. You have to use the CreateProcess API
variant you mentioned before.
and it handwaves about the manifest without actually telling how to
create the manifest (there is no manifest I can find in my project, just
the one that
appears to be created on-the-fly and therefore could not be modified by
hand, even if I
could figure out what should go in it.
I wonder why manifests are so complex that the documentation was not
delivered on the day
that manifests became a component of the system. There's Something Wrong
With This
Picture. I should be able to go to the MSDN, open the section on
manifests, and see the
complete documentation, syntax, semantics, and examples of use. Is it
there? No. I
would like to point out that it is now 2007, and VS2005 has been out for
two years. Is
anyone at Microsoft taking any responsibility for this fiasco?
Joe, do you want help with this problem or just complain about it? Perhaps
the reason why there is no succinct doc on manifests is that they are simply
XML files. The contents are a collection of XML tags. You are asking the
equivalent of some XML primer that knows all possible tags you can possibly
put into your XML file. Impossible! Instead, each section (tag) of the
manifest is separately documented. For example, to specify elevation:
<v3:trustInfo xmlns:v3="urn:schemas-microsoft-com:asm.v3">
<v3:security>
<v3:requestedPrivileges>
<!-- level can be "asInvoker", "highestAvailable", or
"requireAdministrator" -->
<v3:requestedExecutionLevel level="requireAdministrator" />
</v3:requestedPrivileges>
</v3:security>
</v3:trustInfo>
and Common Controls 6:
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
To get this manifest into built into your .exe, I already told you:
In
VS2005 project Properties, see the manifest tab and specify and Additional
Manifest.
-- David