01-16-2011, 05:36 AM
Here is a piece of code I made that finds the location of the running apps:
Put this in a button or the form_load and add a TextBox with multiline set to true.
Unfortunately, this does'nt work for all processes because some of them throw a runtime error. That's why I used Try-Catch. Remove it to see what happens.
Code:
For Each Proc As Process In Process.GetProcesses()
Try
TextBox1.AppendText(Proc.MainModule.FileName & vbCrLf)
Catch
End Try
Next
Unfortunately, this does'nt work for all processes because some of them throw a runtime error. That's why I used Try-Catch. Remove it to see what happens.