How to force user to user Administrator account in WinForms

Posted by Smejda on Stack Overflow See other posts from Stack Overflow or by Smejda
Published on 2010-04-21T04:00:24Z Indexed on 2010/04/21 4:03 UTC
Read the original article Hit count: 450

Filed under:
|
|
|
|

I have simple WinForms application where modifying Windows Registry. The problem is that in Vista / Windows 7 I need to force user to switch to administrator.

I do not want to force user to Run as Administrator form start of the application. I want him to do it when there is necessity to write to registry.

Best case scenario would be to reach exacly the same message which appear in lot's of Setups, when user need to 'switch' to Administrator so there is no necessity to Run as Administrator form beginning.

How I can achieve this in .Net ?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#