Subversion Repositories mystic_house

Rev

Blame | Last modification | View Log | RSS feed

  1. program House;
  2.  
  3. {$R *.res}
  4.  
  5. uses
  6.   Windows,
  7.   SysUtils,
  8.   Dialogs,
  9.   ShellAPI;
  10.  
  11. var
  12.   exe, params, dir: string;
  13.  
  14. begin
  15.   exe := ExtractFilePath(ParamStr(0))+'gplay32.exe';
  16.   params := '/N'+ChangeFileExt(ParamStr(0), '');
  17.   dir := ExtractFilePath(ParamStr(0));
  18.  
  19.   if not FileExists(exe) then
  20.   begin
  21.     ShowMessageFmt('Error: %s not found!', [exe]);
  22.     Exit;
  23.   end;
  24.  
  25.   ShellExecute(0, 'open', PChar(exe), PChar(params), PChar(dir), SW_NORMAL);
  26. end.
  27.