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 ?