/// <summary> /// This method calls the SystemMonitor method in the ProcessMethod class and returns a data table with the process information /// </summary> /// <returns>Datatable</returns> public DataTable ProcessMonitor() { DataTable alProperties = new DataTable(); alProperties = ProcessMethod.SystemMonitor(connectionScope); return(alProperties); }
public ArrayList RunningProcesses() { ArrayList alProcesses = new ArrayList(); alProcesses = ProcessMethod.RunningProcesses(connectionScope); return(alProcesses); }
public static string StartProcess(string machineName, string processPath) { ManagementClass processTask = new ManagementClass(@"\\" + machineName + @"\root\CIMV2", "Win32_Process", null); ManagementBaseObject methodParams = processTask.GetMethodParameters("Create"); methodParams["CommandLine"] = processPath; ManagementBaseObject exitCode = processTask.InvokeMethod("Create", methodParams, null); return(ProcessMethod.TranslateProcessStartExitCode(exitCode["ReturnValue"].ToString())); }
public string GetProcessOwnerSID(string processName) { return(ProcessMethod.ProcessOwnerSID(connectionScope, processName)); }
public void SetPriority(string processName, ProcessPriority.priority priority) { ProcessMethod.ChangePriority(connectionScope, processName, priority); }
public void TerminateProcess(string processName) { ProcessMethod.KillProcess(connectionScope, processName); }
public string CreateProcess(string processPath) { return(ProcessMethod.StartProcess(Environment.MachineName, processPath)); }
public String returnUsageForProcess(int pid) { return(ProcessMethod.getUsageForProcess(pid, connectionScope)); }