I have succeded in using CreateProcessWithLogonW to start processes from a windows service with the SYSTEM account. But when starting a GUI app, like notepad, the process starts and the window is being half-drawn, only the frames are visible. It is sort of hanging.
One strange thing is, that I received a C# compiled exe service. I installed it and it starts a notepad under the same username/password. The window looks like it should be. After that, my function works every time with every user. Unfortunately I have no access to this sourcecode. This app is doing something that my app doesn't and it's evident that it's enough to do this once.
What initial values at CreateProcessWithLoginW or other values may affect this behaviour? Any ideas?
One strange thing is, that I received a C# compiled exe service. I installed it and it starts a notepad under the same username/password. The window looks like it should be. After that, my function works every time with every user. Unfortunately I have no access to this sourcecode. This app is doing something that my app doesn't and it's evident that it's enough to do this once.
What initial values at CreateProcessWithLoginW or other values may affect this behaviour? Any ideas?