Are you trying to find out where the current program is running, or do you want to know if a different program is running? Do you care where it runs from, or do you just want to know if a program is running?
If you want to know whether or not minesweeper is running:
If FindWindow(pchar('Minesweeper'),pchar('Minesweeper')) <> 0 then
showmessage('Look, it's minesweeper.');
I don't know how to determine the .exe location of an external program.
Brian
"There are 2 kinds of people in the world, those that divide people into two groups and those that don't. I belong to the second group." - tag line I stole