'************************** Function to Kill Process ***************************
' Created By : Baba Fakruddin Dudekula' Created on : 22-Aug-2011
Function KillProcess(ProcessName)
Dim blnFlag
Killprocess = ProcessName '"iexplore.exe" 'per ex : calc.exe
Set ProcessList = GetObject("winmgmts://.").InstancesOf("win32_process")
blnFlag = False
For Each Process In ProcessList
If Process.Name = KillProcess Then
Process.Terminate
blnFlag = True
End If
NextIf blnFlag = False Then
KillProcess = False
ElseKillProcess = True
End If
End Function' *************************** *************************** *************************** ********
"A good threat is worth a thousand tests" - Boris Beizer

0 comments:
Post a Comment