- 帖子
- 121
- 积分
- 183
- 技术
- 16
- 捐助
- 0
- 注册时间
- 2021-8-21
|
2楼
发表于 2022-3-13 13:41
| 只看该作者
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 |
|