Vbs can be used on the web with just a few changes, but it is difficult to find the type of the object. It is always uncomfortable to use the object.
Dim WMI
Set WMI = GetObject ( " Winmgmts: " )
Set Objs = WMI. instancesof ( " Win32_process " )
For Each OBJ in objs
Enum1 = Enum1 + OBJ. Description + CHR ( 13 ) + CHR ( 10 )
Next
Dim WMI As Object
WMI = GetObject ( " Winmgmts: " )
Dim Objs As Object = WMI. instancesof ( " Win32_process " )
Dim OBJ As Object
' List Processes
For Each OBJ In Objs
Response. Write (obj. description)
Response. Write ( " <P> " )
Next
Strcomputer = " . "
Set Obw.miservice = GetObject _
( " Winmgmts :\\ " & Strcomputer & " \ Root \ cimv2 " )
Set Colprocesslist = Ob1_miservice. execquery _
( " Select * From win32_process where name = 'qq.exe' " )
' Terminate QQ Process
For Each Objprocess in colprocesslist
Objprocess. Terminate ()
Next
Dim Strcomputer As String = " . "
Dim Obw.miservice As Object = GetObject _
( " Winmgmts :\\ " & Strcomputer & " \ Root \ cimv2 " )
Dim Colprocesslist As Object = Ob1_miservice. execquery _
( " Select * From win32_process where name = 'qq.exe' " )
Dim Objprocess As Object
For Each Objprocess In Colprocesslist
Objprocess. Terminate ()
Next