The simplest solution is as follows:
- From the original process, process A say, use
CreateProcessAsUser
to create a new process, process B, say. Process B runs as a different user. - Pass to process B command line arguments that specify the file that you want to open.
- From process B call
ShellExecute
orShellExecuteEx
to open the other file.