Hello,
A pure process killer that you can use from a batch file once the source compiled as a standalone executable
#Option Explicit
#AppType CONSOLE
#DllDeclare Kernel32( "CloseHandle", "OpenProcess", "TerminateProcess" )
#DllDeclare User32( "FindWindow", "GetWindowThreadProcessId" )
Print Kill( "Notepad", Null )
Print Kill( "XLMAIN", Null )
Pause
Function Kill( byVal szClass, byval szCaption ) As Integer
Dim %pid = 0, %hWnd = 0, %hProc = 0, %PROCESS_TERMINATE = 1
hwnd = FindWindow( szClass, szCaption )
If hwnd = 0 Then Return False
GetWindowThreadProcessId( hWnd, @pid )
If pid = 0 Then Return False
hProc = OpenProcess( PROCESS_TERMINATE, False, pid )
If hProc Then
TerminateProcess( hProc, 0 )
CloseHandle( hProc )
Return True
End If
Return False
End Function