I have a C# service with framework 4, it runs an external application using process.start, but it starts on the background, i install the service using
InstallUtil.exe -u Service.exe
from a command prompt running as administrator
here is the code:
Process.Start("path\to\application.exe");
These questionings are bugging me the most:
Does the application start on the background because i'm using a command prompt with administrative privileges?
Or because of the scope of the service (which is LocalSystem)?
Or even because the framework i'm using?
What i want is the application to be visible, what can i do?, what am i doing wrong?
What I have tried:
I tried this code to make the application visible, but it doesn't work (it starts on the background):
var processPath = ConfigurationManager.AppSettings["path"];
var process = new Process();
process.StartInfo = new ProcessStartInfo(processPath);
process.StartInfo.Verb = "Open";
process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
process.StartInfo.WorkingDirectory = Path.GetDirectoryName(processPath);
process.Start();
I even tried the option "Allow service to interact with desktop"