views:

137

answers:

3

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 confirmation dialog, then?

A: 

You should try to run your application with admin rights. Try "Run As User" to do this.

codymanix
Well, I don't wan't to tell all my users "You have to run as administrator this program..."
FBSC
A: 

You need to check if the user has the needed rights before setting the registry key start here

Ricky AH
+1  A: 

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

Remi THOMAS
It doesn't works :(
FBSC