I have a c# Windows Service that is required to call an exe periodically. That exe need to interact with desktop. When I installed the service, I clicked "Allow service to interact with desktop" option.
Service Starts fine but it is not running the exe as expected.
var myProcess = new Process
{
StartInfo = new ProcessStartInfo(@"C:\windows\TestApplication\TestApplication.exe"),
//StartInfo = new ProcessStartInfo(@"C:\temp\Projects\TestConsoleApp\TestConsoleApp\bin\Debug\TestConsoleApp.exe"),
};
myProcess.StartInfo.Domain = "MyDomain";
myProcess.StartInfo.UserName = "Testuser";
myProcess.StartInfo.Password = pwd;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcess.Start();
myProcess.WaitForExit();
Any ideas as to what could be the issue? Is Local System Account does not have access to the System ? How do I find the Local System Account?
Any pointers?