Getting PATH of running *.exe
In XP and above you can use the “System Information” tool,
which shows the path.
You can run this from the menu at “Start” →
“All Programs” → “Accessories” → “System Tools”,
or from the command line as msinfo32
(or “Start” → “Run…” → msinfo32
ENTER).
Click on “Software Environment” → “Running Tasks”, and the path is shown.
http://www.raymond.cc/blog/determine-program-path-from-task-manager-for-each-program-in-windows-xp-windows-server-2003/
Using Windows Powershell, if you want to do find out the path for "firefox.exe, you could do:
(Get-WmiObject -class Win32_Process -Filter 'Name="firefox.exe"').path.SubString(0, (Get-WmiObject -class Win32_Process -Filter 'Name="firefox.exe"').path.LastIndexOf('\'))
This would return:
C:\Program Files (x86)\Mozilla Firefox
Replace "firefox.exe" with desired executable.