Help with understanding why UAC dialog pops up on Win7 for our application

前端 未结 5 452
情书的邮戳
情书的邮戳 2021-01-12 15:11

We have a C++ unmanaged application that appears to cause a UAC prompt. It seems to happen on Win7 and NOT on Vista

Unfortunately the UAC dlg is s

5条回答
  •  粉色の甜心
    2021-01-12 15:56

    Windows automatically elevates applications based on various criteria (listed in Understanding and Configuring User Account Control in Windows Vista):

    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.

    The best solution to all of these is to create a manifest that prevents elevation, though renaming the file may be enough.

提交回复
热议问题