How do I find the process name and kill it.
Here's my code where I check that the process is running but then what? I tried using the wildcard but it does not work.
Dim nameProcess() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcesses For Each p As Process In Process.GetProcesses() Debug.WriteLine(p.ProcessName) Next ' this is the process check function threeD = 3D 'I have declared this as string before in the code If IsProcessRunning(threeD) = True Then MsgBox("3D Found") End If
I also tried this:
Dim proc() As Process = Process.GetProcessesByName("3D*") ' closes PowerPoint files For Each temp As Process In proc temp.Kill() Next