views:

722

answers:

1

I had to delve into this because the code that worked fine on Windows 2003/XP doesn't on Windows 7. Application launched by the use of CreateProcessAsUser fails with 0xc0000142 error code. The difference between my old code and one available from MSDN at Starting an Interactive Client Process in C++ is that I didn't set up privileges and to Window Station and desktop. I've updated my code according to the example, but I would very much like to understand which change in newer Windows made running processes in interactive Window station a requirement?

A: 

At least part of the requirements derive from the change to run interactive processes in a different session from services. This was done so that applications could not run 'shatter' style attacks against privileged services. More information is available here.

Eric Brown
Yes, I've stumbled upon this when researching the issue. It is not completely relevant to the question though. In a scenario when _ordinary_ executable starts another process using CreateProcessAsUser something different happens on Windows 7 and Windows 2003/XP because on XP process starts successfully and fails with 0xc0000142 on newer OS. Apparently the process doesn't go to interactive session because if I make it to do that according to MSDN example it starts fine. I'm interested in knowing what actually happens and what has changed since XP.
Oleg Zhylin