// Usage: taskkiller.exe <taskname.exe>
// cTask is the name of the task to kill. Include the .exe extension if needed
FUNCTION Main( cTask )
LOCAL cCommand := "taskkill /IM " + cTask + " /F"
LOCAL cStdOut := ""
IF Empty( cTask )
? "use: taskkiller.exe <taskname>"
ELSE
IF hb_processRun( cCommand,, @cStdOut ) != 0
? cStdOut
ELSE
? "Task " + cTask + " killed"
ENDIF
ENDIF
RETURN