How do I run a COM service as System and allow any client from any security context to connect to it?
I have an .exe that hosts my class object by calling CoRegisterClassObject. When I run the .exe as an Administrator, the same Administrator account can interact with it just fine. When I run the .exe as System, the Administrator account fails when calling CoCreateInstance with error 0x80040154.
UPDATE:
I've made some progress. In the COM service I register my class factory in the running object table with the ROTFLAGS_ALLOWANYCLIENT flag. In the client I use the running object table's GetObject method to get a pointer to the class factory. This allows me to access the service when it runs as an Administrator from a non-Administrator account. However, when it runs as System, a non-System client's CoCreateInstance call fails with 0x80070005. I suspect this issue is related to the one described here.
 
    