I've just noticed that Erik's OpenTools API FAQ and Resources
web page links to my CodeCentral entry
as an example on getting the target executable's file name from Delphi
. Cool! :-)
Note that you only need this for Delphi version 7 or earlier; newer versions already expose TargetName property.