So we have a service running on Server 2008 which kicks off a process (C# app) which does some rendering. The process is running successfully but it is using the system fonts (Arial I believe) instead of fonts which are supposed to be loaded. If I run this process manually by logging into the server, the fonts load successfully and the process renders correctly.
I have tried running this process by using CreateProcessWithLogonW but that still doesn't work. I am assuming this has to do with the non-interactive sessions in Server 2008 but I can't figure out how to solve it.
I ended up solving this by using PSExec using the -i and -h options. From what I understand, it runs CreateProcessWithLogonW or something similar under the scenes. This correctly created a new session with a user account outside of session0. The only thing I had to do was make sure that the EULA for PSExec was accepted for the user I was attempting to run the process with. I also ran the "Interactive Services Detection" service just in case the EULA popped up in session0. After that I turned off "Interactive Services Detection" as I no longer needed it (not really sure that I needed to do this last step).