Hi All,
I've got a number of utilities that run on the same machine as my IIS webserver.
What I'm trying to do is allow a web page to instantiate an executable. If I use Process.Start() the process launches but obviously as the same user as the webserver so it can't interact with the desktop. For 99% of the apps, this isn't a problem. However, I'd like to be able to run them as if a specific user (only ever me) had launched them.
This is more an attempt to see if this is possible than a serious dev project so I'm more interested in the method than the goal.
Ideally, if I'm logged on to the box (almost always) then it should just run as if i'd followed a shortcut. If not, launching the app and having it attached to my desktop when I log on would be perfect. If it's not possible before user login, i can accept that.
I'm aware of the security considerations but am mitigating them by:
- Website needs authentication + SSL
- List of Apps to launch is configured in a file which cannot be modified remotely (or at all by the web user - read only)
- The box is in a DMZ
- Worst-case, the machine is relatively unimportant and can be re-imaged easily.
I've googled but this seems to be a fairly unusual request so there's not a lot of information except for "Don't think you can do that" - So I thought I'd ask here in the hopes of getting either a) a way to do it or b) a decent explanation of why it can't be done.
If it makes it any simpler, put aside the web aspect - How can I launch a process in another users' security context and attached to their desktop (if they have one)
Thanks in advance for any help and pointers you can provide.