Michael B. Price

I'm seeing a very strange issue with respect to CreateProcessAsUser
fails and GetLastError returns error code 233 (ERROR_PIPE_NOT_CONNECTED
or "No process is on the other end of the pipe"), but this only happens
on the 64-bit version of Windows XP (I haven't tested on any non-XP
OSes).

I've tried using CreateProcessAsUserW since I had seen several remarks
that CreateProcessAsUserA's implementation was a little buggy, but
still the same problem.

Here's a description of what my application is doing.

I'm running as service (thus in session 0). My service has registered
to receive session notification messages. Whenever I receive a logon
message (indicating a user has logged on), I grab the session number,
change the TokenSessionId on a copy of my own token, and use that token
to issue a CreateProcessAsUser call to open up notepad.exe in the new
session, with the credentials of my service account (Yes I know this is
a security issue, which we will address as soon as we resolve the
current issue). On 32-bit XP, everything works beautifully. On 64-bit
XP, I get the aforementioned error.

Anyone else seen a similar issue, or know why this is happening

Thanks.


Re: Windows SDK CreateProcessAsUser fails on XP x64

advdbg

Inside CreateProcessAsUser, I believe pipe is used to send the request to the Win32 server process (CSRSS.exe) on the desired session.

Can you share your code






Re: Windows SDK CreateProcessAsUser fails on XP x64

rejm

I guess that the problem is in the transition from a 32bit api to the internal 64 bit api. I have the same problem and a test program which fails when built as 32bit works when built as 64. My workaround is for my 32bit program to spawn a 64bit helper program which calls CreateProcessAsUser for me.





Re: Windows SDK CreateProcessAsUser fails on XP x64

gonlazaro

Did you solve it I have the same problem, but with Windows 2003 64 bits...



Re: Windows SDK CreateProcessAsUser fails on XP x64

CoffeeWally

I have the same problem on CreateProcessAsUser - works beautifully on Windows2000 but craps out on 2003.....



Re: Windows SDK CreateProcessAsUser fails on XP x64

firewalker

I'm having the same problem but on 32bit XP. Vista works. Has anyone solved this

The hack for the moment is to trap the error and retry. If you pause for a second or two, it works. I think the WTS Logon event is received before everything is ready to go in the user's session. What is that dependency





Re: Windows SDK CreateProcessAsUser fails on XP x64

Dimitri Meeuws

I have also the same problem on Windows XP. On Vista my code works.

Has it something to do with privileges or security






Re: Windows SDK CreateProcessAsUser fails on XP x64

Sergey Ten

We had this problem but we found two workarounds:

1. After install SP2 to winXP64-SP1
all work correctly.

2. After login to host without RDP ( manully )
all begin work correctly.