Windows 7 UAC elevation
Posted
by Goz
on Stack Overflow
See other posts from Stack Overflow
or by Goz
Published on 2010-04-23T11:39:08Z
Indexed on
2010/04/23
11:43 UTC
Read the original article
Hit count: 253
I have a single thread that I'd like to run as an administrator in my application. The rest of the application I can happily run as the default user level (asInvoker). Is this possible? I notice there is an "ImpersonateLoggedOnUser" function. Can I somehow use this to log the administrator on and then get the thread to impersonate that person?
It seems as though this ought to be something pretty trivial to do ... but there doesn't appear to be any obvious way to do it. Can anyone help me out?
© Stack Overflow or respective owner