C# how to dynamically enhance administrator permissions

In the WIN7/8 run, my program is set to start automatically when you need administrator privileges.
The test, if the app.manifest house right, program cannot boot.

Therefore want to achieve: when the user clicks the "boot" button settings, program only administrator privileges

Started by Milly at November 10, 2016 - 2:43 PM

Upstairs you more than a few words to explain how ah?

Posted by Frances at November 21, 2016 - 3:13 PM



To add a Attribute
[PrincipalPermissionAttribute(SecurityAction.Demand, Role = @"BUILTIN\Administrators")]

Posted by Jonathan at November 26, 2016 - 3:41 PM