python 判断一个进程是否存在
来源:互联网 发布:java项目一般开发周期 编辑:程序博客网 时间:2024/06/05 01:51
#-*- coding:utf-8 -*-
def check_exsit(process_name):
import win32com.client
WMI = win32com.client.GetObject('winmgmts:')
processCodeCov = WMI.ExecQuery('select * from Win32_Process where Name="%s"' % process_name)
if len(processCodeCov) > 0:
print '%s is exists' % process_name
else:
print '%s is not exists' % process_name
if __name__ == '__main__':
check_exsit('chrome.exe')
def check_exsit(process_name):
import win32com.client
WMI = win32com.client.GetObject('winmgmts:')
processCodeCov = WMI.ExecQuery('select * from Win32_Process where Name="%s"' % process_name)
if len(processCodeCov) > 0:
print '%s is exists' % process_name
else:
print '%s is not exists' % process_name
if __name__ == '__main__':
check_exsit('chrome.exe')
- Python 判断一个进程是否存在
- python 判断一个进程是否存在
- python判断进程是否存在
- shell:判断一个进程是否存在
- python判断一个变量是否存在
- python 判断进程是否存在+获取进程占用内存值
- python 杀进程 判断文件是否存在 查看进程
- python判断一个进程是否正在运行
- 判断某个进程是否存在
- 判断子进程是否存在
- 判断某进程是否存在
- C++ 判断进程是否存在
- C++ 判断进程是否存在
- 判断windows进程是否存在
- VC判断进程是否存在
- VB 判断进程是否存在
- C++ 判断进程是否存在
- C++ 判断进程是否存在
- Android高级应用之 换肤 换主题 主题管理
- myeclipse导入注释模版
- python ElementTree 基本读操作示例
- jQuery获取选中TD的值
- linux程序设计第四版中文pdf下载地址
- python 判断一个进程是否存在
- 工作吐槽
- 如何用Xcode 4.5 编译支持 armv6 CPU及iOS 4.3以前的版本
- Java数据存储
- repo使用
- webservice 参数
- Base64编码
- ICT在线测试原理
- utf-8和unicode转换问题