How to show Confirm Dialog under Vista with C#?
I need to set a register key in vista but if I use the commands without running as Administrator it throws an exception. How do I show the c开发者_StackOverflowonfirmation dialog, then?
You need to embed a manifest with correct user level http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/cb8af5c1-8b06-4d14-a1f3-ed0203354e0c
You should try to run your application with admin rights. Try "Run As User" to do this.
You need to check if the user has the needed rights before setting the registry key start here
精彩评论