I am trying to get a Windows Service to launch an external application. When I start my service it doesn't load the application up.
There are no errors reported in the event view either. It just says the service started and stopped successfully.
The following is the OnStart and OnStop code:
public partial class TestService : ServiceBase
{
public Process App { get; set; }
public TestService()
{
InitializeComponent();
App = new Process();
}
protected override void OnStart(string[] args)
{
App.StartInfo.FileName = @"C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe";
App.Start();
}
protected override void OnStop()
{
App.Close();
}
}