作业帮 > 综合 > 作业

请问这段代码应该是什么意思?(我几乎每一句都不太懂)

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/29 08:44:03
请问这段代码应该是什么意思?(我几乎每一句都不太懂)
set ws=createobject("wscript.shell") set wmi=getobject("winmgmts:\\.\root\cimv2") do Proce = false :OK1=False :OK2=False For each x in wmi.instancesof("win32_process") if InStr(1,"XXX.exe WWW.exe",x.name,1) then Proce = true if LCase(x.name)="1.exe" then OK1=true if LCase(x.name)="2.exe" then OK2=true Next if Proce then if not OK2 then ws.run "c:\2.exe" else if not OK1 then ws.run "c:\1.exe" end if wscript.sleep 1000 loop
set ws=createobject("wscript.shell") 创建对象,调用exe程序 set wmi=getobject("winmgmts:\\.\root\cimv2") 获得系统进程列表 do Proce = false :OK1=False :OK2=False For each x in wmi.instancesof("win32_process") 遍历获得的进程列表 if InStr(1,"XXX.exe WWW.exe",x.name,1) then Proce = true 在"XXX.exe WWW.exe"中查找,系统进程的名字 if LCase(x.name)="1.exe" then OK1=true 把进程名,都转为小写与1.exe比较 if LCase(x.name)="2.exe" then OK2=true 把进程名,都转为小写与2.exe比较 Next if Proce then if not OK2 then ws.run "c:\2.exe" 执行2.exe else if not OK1 then ws.run "c:\1.exe" 执行1.exe end if wscript.sleep 1000 休眠 loop 咋搞这东西...