Hi Dieter,
Thanks so much. My research on RunAsEx is that it is not a WIN32 API -- at
least I didn't find it. The article seemed to describing a clever utility
that the author wrote. In my case, I need to step lightly on the user's
machine -- no registry hacks...
This is a new area for me. I can learn the identify of the printing user
from the JOB_INFO_* structure and with that I can get an SID from
LookupAccountName(). However, in order to CreateProcessAsUser(), I need a
token and it is not clear to me how to get one from the SID or even if I
need to start from the SID.
But I think I have a more fundamental question. Do I want to create a
process or should I create a thread? My expectations is that automating IE
will create a thread to run in any already existing IE process or create an
iexplorer.exe process if necessary. But I don't know this to be true -- I'm
guessing since I only ever see one iexplorer.exe process regardless of the
number of pages I am currently displaying. I still have the same user
identify/security groking issues...
Chris.
"Dieter" <(E-Mail Removed)> wrote in message
news:ec941o$f07$01$(E-Mail Removed)...
> Hi Chris,
> you need the function CreateProcessAsUser.
> Take a look here (Arcticle RunAsEx)
> http://www.codeproject.com/system/RunUser.asp
>
> Perhaps you have to additionally load the users profile. I think the
> article handles this too.
>
> Dieter