Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Check if other PCs in network running the program
TAN WhoAMI
Aug 19 2013 9:50 PM
786
Reply
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");
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
delegates to load user control
After add new item reload the listbox