program Project1;

uses
  SysUtils,//getcurrent,extrafilepath
  System,//ParamStr
  Forms,//application
  Dialogs;//showmessage

begin
  ShowMessage(ExtractFilePath(ParamStr(0)));
  ShowMessage(ExtractFilePath(application.ExeName));
  showmessage(GetCurrentDir+'\');
end.

          无启动窗体。无消息循环。