R – Ghosts windows when color scheme is NOT Aero on Vista

desktopservicesessionidwindows-vista

We have a service that launches an application that will interact with the logged on user. The application we launch is always run as a specific user for which we have the credentials. We do what is necessary (get active session ID, logonUser, adjust token) and launch the application with CreateProcessAsUser in the winsta0\Default desktop.

Everything is working fine if the color scheme of the Vista PC is Aero – but under the basic and classic color schemes, the application is still launched but none of the windows are painted. There is a new task on the taskbar. If you minimize a window which was in the background and in full screen, then you can see the contour of our ghost app – you can move it around, it will respond to keyboard/mouse input just fine. It's just invisible, not painted.

Does anyone has any idea of what could be happening? Why with the Aero color scheme it's fine but not in the others?

Thanks for any help,

Frank

Best Answer

It sounds pretty weird - you may have hit on an actual bug in Vista since it seems unlikely many other people have tried what you are doing.

First of all I'd make sure the problem doesn't exhibit this behaviour when run by the logged in user directly, just to pin it down to whether it's a Aero/Classic issue or a winstation issue.

Secondly I'd attach to the process with a debugger and make sure the message loop is getting various significant messages, particularly WM_PAINT :)

But this is obscure enough that your only option may be to open a paid support issue with Microsoft.

Related Topic