Mega Code Archive

 
Categories / Delphi / API
 

Executing a lnk file

Question: Q) How can I execute a '.LNK' file? Answer: A) The following example demonstrates executing a .lnk file in the Windows start menu. Example: uses ShellApi; procedure TForm1.Button1Click(Sender: TObject); begin ShellExecute(0, nil, 'C:\WINDOWS\START MENU\DELPHI\Delphi3.lnk', nil, nil, SW_SHOWNORMAL); end;