Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Executable that requires elevation

Executable that requires elevation

Scheduled Pinned Locked Moved The Weird and The Wonderful
helptutorial
11 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Michael Haephrati

    I recently worked on a project and at a certain point noticed that the executable that is created requires elevation. It has this icon indicating that an administrator approval is required, and when it is double clicked, the elevation prompt appears. It drove me craze to remove this setting, as the nature of the software didn't require it to be elevated. I looked at the Manifest section when there are settings related to UAC (User Account Control), but even when I matched these settings to the ones taken from another project, which didn't require elevation, my new project did. Today, while speaking to another programmer, he told me how to fix that.... Well, my executable had the string "install" as part of it, and when I renamed it to demo.exe, the icon has changed and no elevation any more required. :)

    Richard DeemingR Offline
    Richard DeemingR Offline
    Richard Deeming
    wrote on last edited by
    #2

    I'm not sure if there's a complete list anywhere, but the heuristics are documented on MSDN:

    http://msdn.microsoft.com/en-us/library/bb530410.aspx[^]

    Installer Detection only applies to:

    • 32 bit executables
    • Applications without a requestedExecutionLevel
    • Interactive processes running as a Standard User with LUA enabled

    Before a 32 bit process is created, the following attributes are checked to determine whether it is an installer:

    • Filename includes keywords like "install," "setup," "update," etc.
    • Keywords in the following Versioning Resource fields: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
    • Keywords in the side-by-side manifest embedded in the executable.
    • Keywords in specific StringTable entries linked in the executable.
    • Key attributes in the RC data linked in the executable.
    • Targeted sequences of bytes within the executable.

    Note The keywords and sequences of bytes were derived from common characteristics observed from various installer technologies.


    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

    "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

    M R R 3 Replies Last reply
    0
    • Richard DeemingR Richard Deeming

      I'm not sure if there's a complete list anywhere, but the heuristics are documented on MSDN:

      http://msdn.microsoft.com/en-us/library/bb530410.aspx[^]

      Installer Detection only applies to:

      • 32 bit executables
      • Applications without a requestedExecutionLevel
      • Interactive processes running as a Standard User with LUA enabled

      Before a 32 bit process is created, the following attributes are checked to determine whether it is an installer:

      • Filename includes keywords like "install," "setup," "update," etc.
      • Keywords in the following Versioning Resource fields: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
      • Keywords in the side-by-side manifest embedded in the executable.
      • Keywords in specific StringTable entries linked in the executable.
      • Key attributes in the RC data linked in the executable.
      • Targeted sequences of bytes within the executable.

      Note The keywords and sequences of bytes were derived from common characteristics observed from various installer technologies.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      M Offline
      M Offline
      Michael Haephrati
      wrote on last edited by
      #3

      Thanks. This is really useful information.

      1 Reply Last reply
      0
      • M Michael Haephrati

        I recently worked on a project and at a certain point noticed that the executable that is created requires elevation. It has this icon indicating that an administrator approval is required, and when it is double clicked, the elevation prompt appears. It drove me craze to remove this setting, as the nature of the software didn't require it to be elevated. I looked at the Manifest section when there are settings related to UAC (User Account Control), but even when I matched these settings to the ones taken from another project, which didn't require elevation, my new project did. Today, while speaking to another programmer, he told me how to fix that.... Well, my executable had the string "install" as part of it, and when I renamed it to demo.exe, the icon has changed and no elevation any more required. :)

        B Offline
        B Offline
        Bernhard Hiller
        wrote on last edited by
        #4

        Thanks for sharing this WTF!

        1 Reply Last reply
        0
        • Richard DeemingR Richard Deeming

          I'm not sure if there's a complete list anywhere, but the heuristics are documented on MSDN:

          http://msdn.microsoft.com/en-us/library/bb530410.aspx[^]

          Installer Detection only applies to:

          • 32 bit executables
          • Applications without a requestedExecutionLevel
          • Interactive processes running as a Standard User with LUA enabled

          Before a 32 bit process is created, the following attributes are checked to determine whether it is an installer:

          • Filename includes keywords like "install," "setup," "update," etc.
          • Keywords in the following Versioning Resource fields: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
          • Keywords in the side-by-side manifest embedded in the executable.
          • Keywords in specific StringTable entries linked in the executable.
          • Key attributes in the RC data linked in the executable.
          • Targeted sequences of bytes within the executable.

          Note The keywords and sequences of bytes were derived from common characteristics observed from various installer technologies.


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          R Offline
          R Offline
          Rage
          wrote on last edited by
          #5

          Richard Deeming wrote:

          Filename includes keywords like "install," "setup," "update," etc.

          What the elephant ? It checks for filename or keywords to determine if a file is an installer ? I call this epic fail !

          ~RaGE();

          I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb

          D D B 3 Replies Last reply
          0
          • R Rage

            Richard Deeming wrote:

            Filename includes keywords like "install," "setup," "update," etc.

            What the elephant ? It checks for filename or keywords to determine if a file is an installer ? I call this epic fail !

            ~RaGE();

            I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #6

            Yes, it does. Any icons with those words in the names do not show up in the Start menu, even if you pin it.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            Richard DeemingR 1 Reply Last reply
            0
            • D Dave Kreskowiak

              Yes, it does. Any icons with those words in the names do not show up in the Start menu, even if you pin it.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak

              Richard DeemingR Offline
              Richard DeemingR Offline
              Richard Deeming
              wrote on last edited by
              #7

              The list of file names you can't pin to the taskbar or start menu is worse than the installer detection heuristics: http://www.west-wind.com/weblog/posts/2009/Oct/08/Application-that-wont-Pin-to-Taskbar-in-Windows-7[^] If you exe name contains any of the following, you can't pin it:

              • Documentation
              • Help
              • Install
              • More Info
              • Readme
              • Read me
              • Read First
              • Setup
              • Support
              • What's New
              • Remove

              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

              1 Reply Last reply
              0
              • R Rage

                Richard Deeming wrote:

                Filename includes keywords like "install," "setup," "update," etc.

                What the elephant ? It checks for filename or keywords to determine if a file is an installer ? I call this epic fail !

                ~RaGE();

                I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #8

                The alternative to a heuristic like that would have been 99% of installers trying to run as normal processes when Vista launched, failing because they couldn't access privileged areas, and bombing. That would have been an order of magnitude more elephanted up. And not just because setting runs-as-user in a manifest if your app name matches the heuristic is strait forward for a dev; but 99% of lusers don't know there is something called admin mode, never mind how to launch a program in it. Edit: PS The VS2k3Sp1 installer doesn't get detected to auto elevate and fails/backs out in a way that gives no indication of what's wrong until on the nth try you realize you never got the elevate prompt.

                Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                B 1 Reply Last reply
                0
                • R Rage

                  Richard Deeming wrote:

                  Filename includes keywords like "install," "setup," "update," etc.

                  What the elephant ? It checks for filename or keywords to determine if a file is an installer ? I call this epic fail !

                  ~RaGE();

                  I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb

                  B Offline
                  B Offline
                  BillW33
                  wrote on last edited by
                  #9

                  That is just epic Microsoft! ;) ;P :laugh:

                  Just because the code works, it doesn't mean that it is good code.

                  1 Reply Last reply
                  0
                  • D Dan Neely

                    The alternative to a heuristic like that would have been 99% of installers trying to run as normal processes when Vista launched, failing because they couldn't access privileged areas, and bombing. That would have been an order of magnitude more elephanted up. And not just because setting runs-as-user in a manifest if your app name matches the heuristic is strait forward for a dev; but 99% of lusers don't know there is something called admin mode, never mind how to launch a program in it. Edit: PS The VS2k3Sp1 installer doesn't get detected to auto elevate and fails/backs out in a way that gives no indication of what's wrong until on the nth try you realize you never got the elevate prompt.

                    Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                    B Offline
                    B Offline
                    BillW33
                    wrote on last edited by
                    #10

                    Yes, there really was no nice clean solution available to them at that point.

                    Just because the code works, it doesn't mean that it is good code.

                    1 Reply Last reply
                    0
                    • Richard DeemingR Richard Deeming

                      I'm not sure if there's a complete list anywhere, but the heuristics are documented on MSDN:

                      http://msdn.microsoft.com/en-us/library/bb530410.aspx[^]

                      Installer Detection only applies to:

                      • 32 bit executables
                      • Applications without a requestedExecutionLevel
                      • Interactive processes running as a Standard User with LUA enabled

                      Before a 32 bit process is created, the following attributes are checked to determine whether it is an installer:

                      • Filename includes keywords like "install," "setup," "update," etc.
                      • Keywords in the following Versioning Resource fields: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
                      • Keywords in the side-by-side manifest embedded in the executable.
                      • Keywords in specific StringTable entries linked in the executable.
                      • Key attributes in the RC data linked in the executable.
                      • Targeted sequences of bytes within the executable.

                      Note The keywords and sequences of bytes were derived from common characteristics observed from various installer technologies.


                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                      R Offline
                      R Offline
                      Rob Grainger
                      wrote on last edited by
                      #11

                      That seems a very deep quote from Homer, I'm more used to "mmm doughnuts".

                      "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups