Executing a process from .NET application without UAC prompt

雨燕双飞 提交于 2019-11-30 19:32:32

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!