Announcement

Collapse
No announcement yet.

Manifests

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Manifests

    I've read some previous threads on manifests and still don't grasp when or why I'd need one. I write simple utilities that mostly do math and print diagrams or such. No installation programs, the user just downloads the zip and puts it wherever he/she wants. Operating system can be any version of Windows from XP on. Should I be using a manifest and what might it look like.

  • #2
    Conrad,

    If you want hassle free performance on Vista and later, yes. The crappy end of AV scanners often spit the dummy if you don't have BOTH a manifest and version control block. Its a bit more work initially but once you have them working, you can reuse them and just modify what you need in both.
    hutch at movsd dot com
    The MASM Forum

    www.masm32.com

    Comment


    • #3
      Manifests have three purposes, of which one is important:

      - Versioning info (similar to the version info of a resource file)
      - Enabling themes for your application
      - Request from/tell the OS which privileges your application requires to run. And that is the important one.

      The relevant node and attribute (@level) in the manifest XML is...
      Code:
        <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
          <security>
            <requestedPrivileges>
              <requestedExecutionLevel
                level="asInvoker"
                uiAccess="false"/>
              </requestedPrivileges>
             </security>
        </trustInfo>
      For possible values of @level (a whopping total of three of them) and their meaning see https://docs.microsoft.com/en-us/pre...929(v=msdn.10). As Steve wrote: it's a bit awkward initially, but once you've set it up, everything is simple enough as most of the time you just keep increasing the version number in the manifest file. PB's #RESOURCE MANIFEST command takes care of the rest for you.

      Also: the (perceived) simplicity of the program isn't really the matter. Even the simplest program might "touch" parts of Windows which are off limit for non admin users, e.g. Open "C:\MyFile.txt" ..., because the root is off limits for everyone and even requires an admin to acknowledge that action via UAC)

      Comment


      • #4
        What Steve and Knuth says, plus - including a manifest enables the use of ComCtl32.dll version 6 or later, which has some nice new creation styles and new calls for common controls like the ListView, etc.

        Comment


        • #5
          So a summary (IMO) is -

          Any malware writer can create a manifest to get enhanced security access.

          Honest code writers need to use a manifest to avoid false positives from low end scanners and to get controls with better eye candy.

          (late - anyone notice the work vs reward are backwards?)

          I'd sign off with "Cheers", but its not too cheery.
          Dale

          Comment


          • #6
            Originally posted by Dale Yarker View Post
            Any malware writer can create a manifest to get enhanced security access.
            Not really an accurate statement at face value. A manifest does not allow an app to access anything more than the user has rights to.

            It allows automated prompting for rights elevation and access to newer controls but only at the level of the running user.
            <b>George W. Bleck</b>
            <img src='http://www.blecktech.com/myemail.gif'>

            Comment


            • #7
              TA, a bit in the right direction.
              Dale

              Comment


              • #8
                Originally posted by George Bleck View Post

                Not really an accurate statement at face value. A manifest does not allow an app to access anything more than the user has rights to.

                It allows automated prompting for rights elevation and access to newer controls but only at the level of the running user.
                To add to that: Wikipedia has a decent explanation what the different entries in the manifest do: https://en.wikipedia.org/wiki/User_A...ting_elevation

                Comment


                • #9
                  Thanks- looks like I have to learn something new.

                  Comment


                  • #10
                    There is another often overlookd reason for manifests. You can define how your program reacts on a "Scaled Screen".
                    The user of a high resolution (4K) Screen can say "Show me Windows in 150%".
                    Now many API's that deal with Pixels will not give you the "real" values. To handle this stuff also Manifests are used (Scaling).
                    --Theo Gottwald
                    ------------------------------------------------
                    76706 Dettenheim * Germany * [email protected]
                    ------------------------------------------------
                    Joses Forum * Theo's Link Site * IT-Berater.org

                    Comment

                    Working...
                    X