Path of a Process

  • Thread starter Thread starter Antares
  • Start date Start date
A

Antares

Hi all,
does it is possible to get the full path name of a process
knowing the ProcessName (get by
Diagnostics.Process.GetCurrentProcess.ProcessName)?
How can I know it?

Regards
Antares
 
If you want to retrieve the path of the currently
executing assembly (the current process), use

System.Reflection.Assembly.GetExecutingAssembly
().Location.ToString();

This should do the trick.

HTH.
 
if you are talking about the executable path which is running then use
System.Windows.Forms.Application.ExecutablePath
 
Back
Top