How do I allow the exe to see the ritem.dat file in the shell execute statement ?
procedure TForm1.Button1Click(Sender: TObject);
begin
if ShellExecute(0,nil, PChar('"D:\SomeDir\abc.exe"'),PChar('"D:\SomeDir\Data\ritem.dat"'),nil,1) =0 then;
end;
Doubleclicking the abc.exe on its own and it runs fine, calling it with this method and it shows Data\ritem.dat can't be found.
I must say the error is called by abc.exe and not Lazarus.
Thanks