Asked by:
CreateProcessAsUser fails on XP x64

Question
-
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.
Monday, June 19, 2006 4:00 PM
All replies
-
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?
Tuesday, July 11, 2006 1:57 AM -
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.
Wednesday, July 19, 2006 1:05 PM -
Did you solve it? I have the same problem, but with Windows 2003 64 bits...Thursday, November 30, 2006 10:49 AM
-
I have the same problem on CreateProcessAsUser - works beautifully on Windows2000 but craps out on 2003.....Tuesday, December 26, 2006 4:54 PM
-
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?
Sunday, March 25, 2007 6:43 PM -
I have also the same problem on Windows XP. On Vista my code works.
Has it something to do with privileges or security?
Tuesday, August 21, 2007 3:32 PM -
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.Wednesday, October 10, 2007 10:54 AM -
I have the same issue with 32 bit XP and works fine with Vista. Someone has any work around?Friday, October 8, 2010 2:55 PM