RE: using CreateProcessAsUser API
- From: Eric Perlin [MSFT] <EricPerlinMSFT@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Dec 2006 16:48:00 -0800
2 posts down, you indicate that your service is running as local system.
Local System (has most privs) & Local Service (has about a third of them)
are 2 different accounts...
In any case, Local Service has these 2 privileges by default as well.
Failures to access the windowstation\desktop typically result in failures to
load kernel32 or user32.
The process may "start" but likely exits before you have a chance to see it
in taskmgr, and before a single line of your code executes.
If you get a process handle, you should be able to get the process exit
code. What is it?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Eric Perlin [MSFT]
"kunal s patel" wrote:
Even if my process doesnt have access to windowstation, it shud atleast show.
up in task manager
It is not even coming up in task manager. Also another thing.....i searched
through msdn n saw that
local service doesnt have SE_ASSIGNPRIMARYTOKEN_NAME and
SE_INCREASE_QUOTA_NAME.....so to
correct that i added both of those rites to the local system....but even
then my process doesnt come up in task
manager
kunal
"Eric Perlin [MSFT]" wrote:
See my previous post.
The process may start but probably fails right away.
There's a good chance that the process you're creating doesn't have access
to the windowstation\desktop your service is running in (it's inherited).
You might as well create a windowstation\desktop, ACL them properly, and
start your app there.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Eric Perlin [MSFT]
"kunal s patel" wrote:
y Hi
I am creating a dummy account in a service and then run the process under
that account using the above api. Now something very wierd
happens......process is created properly...i get proper process id but it
doesnt run the executable.....here r the privileges i included into account
SE_ASSIGNPRIMARYTOKEN_NAME,SE_INCREASE_QUOTA,SE_CREATE_PERMANENT_NAME,SE_CREATE_TOKEN_NAME
and i m using API as
if(!CreateProcessAsUser(newtoken,NULL,"C:\\sim0.exe",0,0,FALSE,CREATE_NEW_CONSOLE
,NULL,NULL,&startupinfo,&procinfo))
kunal
- Prev by Date: Re: Repost: Using SetTokenInformation to control file system virtualization on Vista?
- Next by Date: S/MIME with CAPI
- Previous by thread: PGP Keys For Software Digital Certificate
- Next by thread: RE: using CreateProcessAsUser API
- Index(es):
Relevant Pages
|