function createlinkfile(const info:link_file_info;const destfilename:string=''):boolean;varanobj:iunknown;shlink:ishelllink;pfile:ipersistfile;wfilename:widestring;beginwfilename:=destfilename;anobj:=createcomobject(clsid_shelllink);shlink:=anobj as ishelllink;pfile:=anobj as ipersistfile;shlink.setpath(info.filename);shlink.setworkingdirectory(info.workdirectory);shlink.setdescription(info.description);shlink.setarguments(info.arguments);shlink.seticonlocation(info.iconlocation,info.iconindex);shlink.sethotkey(info.hotkey);shlink.setshowcmd(info.showstate);shlink.setrelativepath(info.relativepath,0);if destfilename='' thenwfilename:=changefileext(info.filename,'lnk');result:=succeeded(pfile.save(pwchar(wfilename),false));end;