>My question is what is the easiest approach? I guess the last bit would be to call ImpersonateLoggedOnUser() somehow but I cannot figure out how I could create a token without knowing the user's username and password.
The documentation for ImpersonateLoggedOnUser says:
"A handle to a primary or impersonation access token that represents a
logged-on user. This can be a token handle returned by a call to
LogonUser, CreateRestrictedToken, DuplicateToken, DuplicateTokenEx,
OpenProcessToken, or OpenThreadToken functions"
So, are the latter 2 APIs possible options for you?
Dave