Shell "taskkill /im nombreproceso.exe"
Ok eso funciona pero lo correcto es que lo haga en VB.
Mira este ejemplo con TerminateProcess()
Código
Option Explicit Private Const STANDARD_RIGHTS_REQUIRED As Long = &HF0000 Private Const SYNCHRONIZE As Long = &H100000 Private Const PROCESS_ALL_ACCESS As Long = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &HFFF) Private Declare Function TerminateProcess Lib "kernel32.dll" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long Private Declare Function GetExitCodeProcess Lib "kernel32.dll" (ByVal hProcess As Long, ByRef lpExitCode As Long) As Long Private Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Private Declare Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As Long Private Sub Command1_Click() Dim pId As Long Dim hProcess As Long Dim exitCode As Long pId = Shell("notepad.exe", vbNormalFocus) hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pId) Call GetExitCodeProcess(hProcess, exitCode) Call TerminateProcess(hProcess, exitCode) Call CloseHandle(hProcess) End Sub