Hello everyone,
From ServiceController class, we can easily get the names of all the services on the current system. My question is how to get the physical absolute path of the executable file for the service? I found quite a while in MSDN, but failed.
thanks in advance,
George
George GeorgePosted Aug 26, 2008, 10:04 PM
Thanks Ryan!
Question answered.
regards,
George
Ryan AlfordPosted Aug 26, 2008, 10:23 AM
George GeorgePosted Aug 26, 2008, 9:37 AM
Thanks Ryan!
I think get executable file path is not supported directly in ServiceController class from the document sent to me. and itis why it needs to do something additional. Correct? :-)
regards,
George
Ryan AlfordPosted Aug 26, 2008, 9:00 AM
George GeorgePosted Aug 25, 2008, 10:30 PM
Cool, Ryan!
So, ServiceController does not have the capability to get the executable file name path, correct?
regards,
George
Ryan AlfordPosted Aug 25, 2008, 4:59 PM
foreach(Process p in processes)
{
// This will give you the full path name of the process
string name = p.MainModule.FileName;
}