Create and Embed an Application Manifest (UAC)

http://msdn.microsoft.com/en-us/library/bb756929.aspxapp

能够在VS2008中设置当执行exe时弹出提高管理员权限对话框:
xx Property->Configuration Properties->Linker->Manifest File,把UAC Excecution Level 项设置为 requireAdministrator 便可。

更多请参考:http://subject.it168.com/article/articleview.aspx?id=734216ide

Valueui

Descriptionthis

Commentspa

asInvokertoken

The application runs with the same access token as the parent process.ip

Recommended for standard user applications. Do refractoring with internal elevation points, as per the guidance provided earlier in this document.get

highestAvailableit

The application runs with the highest privileges the current user can obtain.io

Recommended for mixed-mode applications. Plan to refractor the application in a future release.

requireAdministrator

The application runs only for administrators and requires that the application be launched with the full access token of an administrator.

Recommended for administrator only applications. Internal elevation points are not needed. The application is already running elevated.

相关文章
相关标签/搜索