set ws=createobject("wscript.shell")set fso=createobject("scripting.filesystemobject")set f1=fso.opentextfile ("abc.txt",2,1)for each ps in getobject("winmgmts:").instancesof("win32_process")f1.writeline("进程名"&ps.name&" "&"进程id"&ps.processid) next