I need to be able to click a button to end Chrome.exe Process. What is the best way to accomplish this?
I don't want it to prompt anything just close it.
I need to be able to click a button to end Chrome.exe Process. What is the best way to accomplish this?
I don't want it to prompt anything just close it.
Perhaps:
Called with:Sub FindAndTerminate(ByVal strProcName As String) Dim objWMIService, objProcess, colProcess Dim strComputer strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set colProcess = objWMIService.ExecQuery _ ("Select * from Win32_Process Where Name = '" & strProcName & "'") If colProcess.Count > 0 Then For Each objProcess In colProcess objProcess.Terminate Next objProcess End If End Sub
FindAndTerminate "chrome.exe"
Be as you wish to seem