// Обновление ярлыка для файла (запабликить)
function EditLink(LinkFileName:String; var Buff, Arg, Dir: string):boolean;
var
MyObject: IUnknown;
MySLink: IShellLink;
MyPFile: IPersistFile;
FileInfo: TWin32FINDDATA;
WidePath: array [0..MAX_PATH] of WideChar;
bBuff, bArg, bDir: array [0..MAX_PATH] of Char;
begin
Result := False;
if not fileexists(Linkfilename) then exit;
MyObject := CreateComObject(CLSID_ShellLink);
MyPFile := MyObject as IPersistFile;
MySLink := MyObject as IShellLink;
StringToWideChar(LinkFileName, WidePath, SizeOf(WidePath));
MyPFile.Load(WidePath, STGM_READ);
MySLink.GetPath(bBuff, Max_PATH, FileInfo, SLGP_UNCPRIORITY);
MySLink.GetArguments(bArg,MAX_PATH);
MySLink.GetWorkingDirectory(bDir, MAX_PATH);
Buff:=bBuff;
Arg:=bArg;
Dir:=bDir;
// MySLink.Get
Result := True;
end;