Call another UI AP on NT Server
I have an NT server application running in the background on Windows Vista and I want the server lanuch Notepad.exe when the server receives a certain command, BUT it doesn't work, I tried shellexec, winexec and createprocess functions all failed. Notepad always runs on the server desktop, Vista will show a message to ask me to switch it. is there any way to run it correctly?
a source to share
This is because of Windows Vista session isolation . Your service is running in Terminal Services Session 0, your user is logging into Session 1 or higher, and communication between them is strictly limited.
The officially supported way to do what you want is to have a helper app already running on the users desktop, talking to your service through some kind of IPC (e.g. pipes, sockets). Then, when your service wants to interact with the users' desktop, it asks the helper application to do it for you.
a source to share