I have written a windows service in C# that essentially listens for commands on a specific port and in most cases will create a new Process class and shell execute said task.
I primarily want to use it to launch media. E.g. I have a media file called c:media.avi
-> from a remote client I send "-launch c:media.avi
" and the server launches it in a process class. Easy!
The problem that I am having is that when the service runs under the localsystem context, the avi will run in its native application, say, windows media player BUT, there is no sound at all.
Trying the same process under my user account context [provided UN and PW to service] runs the .avi file WITH sound but I cant see the window at all.
Does anyone know how I can get the service to run under the context of the user that is currently logged on - so that I can get sounds and video?