I have a binary which creates and later removes entries from Program and Features (also comes up in Add/Remove Programs). While I can get UAC permissions when creating the entries, my requirements do not allow me to show a UAC prompt when I need to remove the entries. This makes sense as you should need admin permissions when deleting registry entries from HKLM.
But I have noticed that I am able to uninstall the entries from the Program and Features window without a UAC prompt. How is uninstalling from there, which invokes my binary anyways, different from me invoking my binary directly? Is there some way I can run my binary the same way and avoid the UAC prompt?