How to request administrator permissions at runtime
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
I want to ask for administrator permissions anycodings_runtime at runtime in my application, but I couldn't anycodings_runtime find anything, despite the googling and anycodings_runtime searching. I could only find posts regarding anycodings_runtime rights at startup, I found one but, it was anycodings_runtime valid for .NET Framework, I can't really use anycodings_runtime dNF, I am using .NET Core 3.1
Similar questions https://www.anycodings.com/1questions/482600/how-to-request-administrator-permissions-at-runtime
Describe the solution you'd like

After the user confirms, it continues to run in admin token
Additional context
No response
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
@Luokun2016 it's not possible to elevate permissions of an existing process, the common workaround for only conditionally needing administrative permissions (where declaring it in the app manifest is not desireable) is to restart the app with admin permissions https://stackoverflow.com/a/7351689
@Luokun2016 please let us know if @Suchiman 's suggestion will not work in your case.
Works fine. Thanks.