You'll want to modify the manifest that gets embedded in the program.
(您将需要修改嵌入到程序中的清单。)
This works on Visual Studio 2008 and higher: Project + Add New Item, select "Application Manifest File". (这适用于Visual Studio 2008和更高版本:Project + Add New Item,选择“ Application Manifest File”。)
Change the <requestedExecutionLevel>
element to: (将<requestedExecutionLevel>
元素更改为:)
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
The user gets the UAC prompt when they start the program.
(用户在启动程序时收到UAC提示。)
Use wisely; (明智地使用;)
their patience can wear out quickly. (他们的耐心会很快耗尽。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…