How do I request Administrator privileges during runtime so the user is given the prompt to allow or disallow it?
How do I request Administrator privileges during runtime so the user is given the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This information is written in the exe file manifest. You must use the
requestedExecutionLevelfield (but not sure about that – try setting it tohighestAvailableand see if it does what you need). See for example here for more information (somewhat older article but still valid): LinkThere are tools in Visual Studio which allow you to embed your own manifest or even just edit it. Also there is a tool written in Perl ( http://metacpan.org/pod/Win32::Exe::Manifest ).
EDIT: see this article for more info: http://www.codeproject.com/Articles/66259/Requesting-Admin-Approval-at-Application-Start.aspx