I am writing a small program to retrieve list of services and processes running on a remote computer, all is running well. I am using Process for ret list of processes and ServiceController for list of services. Now is there anyway to get the size of the processes that are running on remote pc and actually find the size of the file associated with the process?
Share
To perform remote administration functions, usually, the right answer is to use WMI.
Win32_Processclass for process information.Win32_Serviceclass for services.And using types in
System.Managementto interact with WMI from .NET. This page includes a simple example.I would suggest using WMI for both remote and local information—avoiding two sets of code to maintain.