locked
Maifest question RRS feed

  • Question

  • I am trying to get my app certified for Vista, and am required to embed  a manifest with security settings.  My exe is created with C++ Builder, which does not support creating manifests.  So I am trying to create a separate manifest, and import it using mt.exe.  Here is the manifest I am using:

    <?xml version="1.0" encoding="utf-8" ?>
    <assembly xmlns="urn:schemas-microsoft-com:asmv.v1"
              manifestVersion="1.0">
      <assemblyIdentity version="1.0.0.0"
        processorArchitecture="X86"
        name="AppName"
        type="win32" />
      <description>App Description</description>
      <trustInfo xmlns="urn:schemas-microsoft.com:asm.v2">
        <security>
          <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" />
          </requestedPrivileges>
        </security>
      </trustInfo>
    </assembly>

    When I import this using mt.exe, and try to run the executable, I get "The application has failed to start because its side-by-side configuration is incorrect".   However, I can create myapp.exe.manifest (using the above manifest) and it starts fine.  Why does it fail when embedded?

    Also, when I try the above method (external manifest) under Windows XP, I get "the system cannot execute the specified program".  I would prefer not to have to ship two separate file sets or exes depending on operating system - why can't XP deal with the manifest?

     

     

    Wednesday, March 21, 2007 6:04 PM

All replies

  • Here's a manifest.txt file I use when embedding with MT.EXE:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version="1.0.0.0"
    processorArchitecture="X86"
    name="app.exe"
    type="win32"/>

    <description>App Desc</description>
    <!-- Identify the application security requirements. -->
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
    <requestedPrivileges>
    <requestedExecutionLevel
    level="asInvoker"
    uiAccess="false"/>
    </requestedPrivileges>
    </security>
    </trustInfo>
    </assembly>

    I use this command line:

    mt.exe -manifest manifest.txt -outputresource:app.exe;1

    Make sure you use MT.EXE dated 10/19/2006 version 5.2.3790.2075. It is the only one that actually works properly in all cases.

    Be sure to sign AFTER embedding the manifest.
    Wednesday, March 21, 2007 6:59 PM
  • asmv.v1  ->  asm.v1

    Typo?

    Wednesday, March 21, 2007 7:02 PM
  • You are correct - the typo was the problem - duh.

     

    Wednesday, March 21, 2007 8:35 PM