Re: Launch an executable as a user from an administrative account
- From: "Remy Lebeau" <no.spam@xxxxxxxxxxx>
- Date: Thu, 15 May 2008 23:38:11 -0700
"Stefan Kuhr" <kustt110@xxxxxx> wrote in message
news:uYkqxzntIHA.4772@xxxxxxxxxxxxxxxxxxxxxxx
One of the problems you will face is clearly identifying a process
of the user (as there are potentially many interactively logged on users)
You can determine which of the logged in users is currently the most active
user. Look at WTSEnumerateSessions(), WTSGetActiveConsoleSessionId(),
WTSQuerySessionInformation() and WTSQueryUserToken(). In fact, I image
WTSQueryUserToken() would return the type of token you are looking for. But
if you want to extract a token from a process, then enumerate the running
processes via PSAPI until you find a suitable one, and then use
OpenProcess() and OpenProcessToken().
Gambit
.
- Follow-Ups:
- Re: Launch an executable as a user from an administrative account
- From: Stefan Kuhr
- Re: Launch an executable as a user from an administrative account
- From: Philippe Maire
- Re: Launch an executable as a user from an administrative account
- References:
- Launch an executable as a user from an administrative account
- From: Philou66
- Re: Launch an executable as a user from an administrative account
- From: Stefan Kuhr
- Launch an executable as a user from an administrative account
- Prev by Date: Re: A new Critical Section for high contention situations
- Next by Date: Re: A new Critical Section for high contention situations
- Previous by thread: Re: Launch an executable as a user from an administrative account
- Next by thread: Re: Launch an executable as a user from an administrative account
- Index(es):
Relevant Pages
|
Loading