import win32com.client
import time
import os
def check_exsit(process_name):
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)
r_a=os.system(r’c:\bak\1.exe’)
print(r_a)
#a=input()
aa=2
while aa > 1 :
if name == ‘main’:
check_exsit(‘1.exe’)
#windows的进程判断,常驻内存。
可以修改脚本哦!
详情可以咨询作者本人哦!
更多详情请关注我哦!
windows的进程判断,常驻内存
最新推荐文章于 2024-05-30 07:32:10 发布