import win32com.client

def check_exsit(process_name):
    WMI = win32com.client.GetObject('winmgmts:')
    processCodeCov = WMI.ExecQuery('select * from Win32_Process where Name like "%{}%"'.format(process_name))
    if len(processCodeCov) > 0:
        return True
    else:
        return False

if __name__ == '__main__':
    res = check_exsit('tray.exe')
    print(res)

 

相关文章:

  • 2021-12-25
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
猜你喜欢
  • 2022-02-22
  • 2022-03-13
  • 2021-08-06
  • 2021-10-21
  • 2022-12-23
  • 2021-09-21
  • 2022-01-04
相关资源
相似解决方案