By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,824 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,824 IT Pros & Developers. It's quick & easy.

Starting processes on alternate desktop

P: n/a
I wrote a Desktop class for manipulating desktops and window stations.
The class is being used by a service for starting applications on the
interactive desktop (the service cannot run as Local System, so it
doesn't inherently have access to the interactive desktop). A simple
launcher application gives the service access to the interactive desktop
via ACL manipulation.

However, the only way I've been able to start a process on the
interactive desktop is by using the CreateProcess Win32 API and
specifying the desktop name in the lpDesktop member of the STARTUPINFO
structure. I have so far been horribly unsuccessful in starting a
process on the desktop using .Net's Process class. I try changing the
service's window station and desktop via calls to OpenWindowStation,
OpenDesktop, SetProcessWindowStation, SetThreadDesktop. However, the
process is never able to properly open a window on the desktop.

I'd like to be able to use the Process class's stdout/stderr redirection
(rather then implementing the redirection myself within the
CreateProcess call).

So... any suggestions? Or am I just better off handling the redirection

Oct 26 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.