Author: Udo Nesshoever How to obtain the linked file from a shortcut Answer: 1 uses ShellAPI; 2 3 function ExeFromLink(const linkname: string): string; 4 var 5 FDir, 6 FName, 7 ExeName: PChar; 8 z: integer; 9 begin 10 ExeName := StrAlloc(MAX_PATH); 11 FName := StrAlloc(MAX_PATH); 12 FDir := StrAlloc(MAX_PATH); 13 StrPCopy(FName, ExtractFileName(linkname)); 14 StrPCopy(FDir, ExtractFilePath(linkname)); 15 z := FindExecutable(FName, FDir, ExeName); 16 if z > 32 then 17 Result := StrPas(ExeName) 18 else 19 Result := ''; 20 StrDispose(FDir); 21 StrDispose(FName); 22 StrDispose(ExeName); 23 end;