Monitor when an exe is launched

前端 未结 5 1703
一生所求
一生所求 2020-12-04 15:43

I have some services that an application needs running in order for some of the app\'s features to work. I would like to enable the option to only start the external Window

5条回答
  •  伪装坚强ぢ
    2020-12-04 16:35

     public Process IsProcessOpen(string name)
            {
                foreach (Process clsProcess in Process.GetProcesses())
                    if (clsProcess.ProcessName.Contains(name))
                        return clsProcess;
                return null;
            }
    

提交回复
热议问题