1.
Function KillProcess(ProcessName)
strComputer = "."
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")
Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process Where Name = '" & ProcessName &"'")
For Each objProcess in colProcessList
objProcess1.Terminate()
Next
End function
2.
systemutil.CloseProcessByName "notepad.exe"
3.
Function KillProcess2(processname)
Dim wShell
Set wShell = CreateObject( "WScript.Shell" )
wShell.Exec "TASKKILL /F /IM " & processname
set wShell = nothing
End Function