Executing a process from .NET application without UAC prompt

前端 未结 1 1894
有刺的猬
有刺的猬 2021-01-05 04:12

I have a scenario where I need to launch an EXE from my .NET application, but I can\'t get around the UAC prompt that pops up. The prompt is triggered even before the other

相关标签:
1条回答
  • 2021-01-05 05:09

    To prevent a UAC prompt when launching a second EXE:

    1) do not use Verb = "runas" -- that will give you UAC every time

    2) do not use setup-like filenames for your EXE. Here is the rule from MSDN:

    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.

    0 讨论(0)
提交回复
热议问题