I need to do some registry operations & other system operations for that i need admin permission. currently user have to start my application as “Run as administrator”.
so How could i launch my application with admin rights?
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.
CreateProcessAsUserorCreateProcessWithLogonWis the main thing you need. ForCreateProcessAsUser, you’ll need to use a few other things to make it do its tricks though (e.g.,AdjustTokenPrivilegesto enable the privileges it uses, andLogonUserto get a user’s token).