Réponse acceptée !
bjr
Code trouvé sur lesite de Delphicool, merci à lui:
uses ComObj, SHLObj, ActiveX;
procedure TForm1.Button1Click(Sender: TObject);
var
IdList: PITEMIDLIST;
Path: array[0..MAX_PATH] of Char;
ShellLink : IShellLink;
ShortCutPath: string;
begin
if SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, IdList)= NOERROR then
begin
SHGetPathFromIDList(IdList, Path); // Chemin du bureau de Windows
{ Création du raccourci }
ShellLink:=CreateComObject(CLSID_ShellLink) as IShellLink;
ShellLink.SetDescription('');
ShellLink.SetPath(PChar(Application.ExeName));
ShellLink.SetShowCmd(SW_SHOW);
ShortCutPath:= String(Path)+ '\'+ 'Mon raccourci'+ '.LNK';
(ShellLink as IpersistFile).Save(StringToOleStr(ShortCutPath), true);
end;
end;
bon dimanche