My app runs as Standard User. Occasionally I need to create a Registry Key that requires Admin access. I would like to prompt the user for Admin permission.
If I do something along these lines:
GetNamedSecurityInfo
AllocateAndInitializeSid
SetEntriesInAcl
SetNamedSecurityInfo (or RegSetKeySecurity)
should this cause Windows to automatically pop up a dialog prompting the user for authorization?
Do I instead have to launch a process just to get access to the Registry? In which case, how do I prompt the user to obtain Admin rights for the process?
I prefer not to use CredUIPromptForCredentials
because I don't want to see the user's password.
I've read through the Access Control documentation, can't seem to see the forest for the trees.