I have a program running on my desktop machine that makes a WCF service available. This is a regular Windows Forms application that I run when logged in as a normal user.
I put the WCF interface in so that I could see the status of the program from an external web page. This works great, I can see the status of the running program and even change things as I see fit.
The only thing I can't do is start the program. If I go to the web page and the program is not running, I'd like to be able to start it. A simple Process.Start(programEXE) doesn't suffice because while the program starts, it is not on the desktop and I can't see it, though it does show up in Task Manager.
I tried creating credentials and launching the program with those credentials, but it exits with a very vague "Program failed to start" error, or starts with my credentials but still doesn't show up on the desktop. In the latter case, I see it in Task Manager under my name, but don't see the actual program.
So, How do I start a program on the server, visible on the desktop of the logged-in user (There's only one user and that user is always logged in)?
Also, what are some things that I can do to ensure that this doesn't become a security hole? One thought I had was to run the launcher.aspx in its own virtual directory, under a userid that only has read permissions to the one directory where program.exe is located, and has no other read or write permissions. Any other suggestions?
Finally, just to be clear: I am not trying to launch anything on the user's computer. Clicking on the "launch program" link should launch a program on the web server and not on the client machine, and that program should be visible to the logged-in user on the server.