Dim WMI,WS,SF
Dim objs,line,file1
Set SF=CreateObject("Scripting.FileSystemObject")
Set WS = CreateObject("Wscript.Shell")
Set WMI = GetObject("WinMgmts:\\.\root\cimv2")
Set file1=SF.OpenTextFile("A.txt")
DO While file1.AtEndOfStream <> True
line =file1.ReadLine
Set objs = WMI.ExecQuery("Select * from Win32_Process where name='&line&'")
if objs.count=0 then
WS.Run(line)
else
end if
Loop
file1.Close作者: Fit 时间: 2022-3-13 13:41