I want to check if certain program is executing from other PCs in the network. I test with below code, which works for local PC. How do I extend to check for other PCs in the network?
thanks.
using System;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
using System.Linq;
class Program
{
static void Main(string[] args)
{
bool isRunning = Process.GetProcessesByName("Abc")
.FirstOrDefault(p => p.MainModule.FileName.StartsWith(@"X:\ABC\test\Bin")) != default(Process);
if (! isRunning)
MessageBox.Show("nothing");
else
MessageBox.Show("run");
}
}