I have an app that can mostly run as the current non-admin user, but some features of the app (user-activated by way of a button click) need to have admin privileges to work. I want the UAC to pop up when the user tries to use these privileged features, but I don't want to have to run the app as admin. Is that possible without moving the privileged features into their own executable?
I've been googling for the last hour or so, and I can't find anything that doesn't require the entire app to be run as admin.
EDIT =============
As it stands right now, my solution was to create a separate console application to contain the privileged code. It's not the way I wanted to do it, and at best it's merely a work-around.
I guess I can understand the possibility of exploiting some esoteric attack vector if running parts of a program with elevated privileges was allowed, but this is damn inconvenient. I thought they called this stuff "managed" code.