How to set the execution level for a .Net application to run with administrator privileges when it is launched in a regular user account in Win XP?
access to the registry requires an elevated privilege. However, there is only a piece of code that requires additional permission. Impersonation is used to process such scenarios, that is, you will run this application as a regular user, but this particular piece of code will be executed as if you were an administrator.
http://msdn.microsoft.com/en-us/library/system.security.principal.windowsimpersonationcontext.aspx
Source: https://habr.com/ru/post/1748801/More articles:How to change the application file of the application that is currently running (on Linux)? - c ++Android development - androidAny high-level languages that can use the c libraries? - c ++Effective most common suffix algorithm? - algorithmКристальный отчет, основанный на группах Резюме на нижнем колонтитуле отчета - crystal-reportsInsert default value if input text is deleted - jqueryHow to change Firefox configuration programmatically at runtime? - firefoxHow can I mark one file as unresolved after a failed merge in git? - gitAccessing the