mstefan wrote:
stevo_ wrote: Out of interest, is there any plans to put finer granularity on elevation, so that methods can request elevation for their tree of execution.
I can't see any way you could do that securely, particularly with unmanaged code; that would basically create such a huge, gaping hole through UAC that you might as well just remove it altogether.
Probably the best way is to elevate a COM worker object.
Set these reg values in addition to your normal reg:
HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{CLSID}\LocalizedString = <displayname>
HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{CLSID}\Elevation\Enabled = 1
Then use something like CoCreateInstanceAsAdmin http://msdn2.microsoft.com/en-us/library/ms679687.aspx
You can use Button_SetElevationRequiredState(hwndButton, true); to get that little elevation shield on your button.