Uniquely identify a running exe?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • 01423481d@gmail.com

    #1

    Uniquely identify a running exe?

    Hi all

    Here is a segment of code used to find out all running processes

    Imports System.Diagnost ics

    ....
    Dim myProcesses() As Process
    Dim myProcess As Process

    'Get the list of processes
    myProcesses = Process.GetProc esses()

    'Iterate through the process array
    For Each myProcess In myProcesses
    if myProcess.Proce ssName="aaaa" then
    '''something
    end if
    Next

    However the above code uses "name of the process", which is not
    sufficient to uniquely identify the process. I would like to ask if
    there is any way to identify a running process APART FROM its name?

    As far as I known I could use "class ID" (GUID) as a key to find out a
    running process/control, could anyone advise me how to achieve this? or
    you have a better method?

    Thanks!

  • Spam Catcher

    #2
    Re: Uniquely identify a running exe?

    01423481d@gmail .com wrote in news:1164170680 .442996.326780
    @h48g2000cwc.go oglegroups.com:
    However the above code uses "name of the process", which is not
    sufficient to uniquely identify the process. I would like to ask if
    there is any way to identify a running process APART FROM its name?
    You can use the ProcessID

    Comment

    Working...