Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Know if exe is running by its full exepath ?

Status
Not open for further replies.

Spent

Programmer
Mar 20, 2003
100
BG
Can you tell me how to findout if exe is running by identifying the exe by its exe path+name.For example to know if 'c:\games\Minesweap2\mine2.exe' is running.Thanks
 
hi,

ExtractFilePath will return the drivepath, Application.exename will return the name of the application.

ExtractFilePath(Application.ExeName) + Application.ExeName

Steph [Bigglasses]
 
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
&quot;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.&quot; - tag line I stole
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top