Hello How can I make a button that requests the admin priviledges from the user? Just like UAC works in Windows, if a program needs admin rights, you get an UAC window. I will mark the correct post as answer of course. thanks
You cant. You need to specify your whole app is running elevated, OR you can do things a-la-mozilla style, create a helper app that does run as admin, and call it from your UAC button.
Comment if you want clarification.
See this example on CodeProject .
You will have to restart your application to elevate its rights.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.