Reference TShellLink
Declared in Codebot.Windows.Shell.Tools.pas on line 165
TShellLink reads and writes Windows shortcuts, the .lnk files used by the desktop and the start menu. Set the properties and call Save, or call Load to read a shortcut into the properties
TShellLink = class(TComponent)
public
{ Clear the properties except FileName }
procedure Clear;
{ Read the shortcut named by FileName }
procedure Load; overload;
{ Read a shortcut and set FileName }
procedure Load(const FileName: string); overload;
{ Write the shortcut named by FileName }
procedure Save; overload;
{ Write a shortcut and set FileName }
procedure Save(const FileName: string); overload;
{ Find the target of a shortcut whose target was moved or renamed, saving
the shortcut if it was found. When ShowUI is true Windows may ask the user
to find it. Returns false if the target was not found }
function Resolve(ShowUI: Boolean = False): Boolean;
published
{ The command line arguments passed to the target }
property Arguments: string read FArguments write FArguments;
{ The comment shown as the tooltip of the shortcut }
property Description: string read FDescription write FDescription;
{ The .lnk file of the shortcut }
property FileName: string read FFileName write FFileName;
{ The keyboard shortcut which opens the target, with the virtual key in the
low byte and HOTKEYF_ modifiers in the high byte }
property HotKey: Word read FHotKey write FHotKey default 0;
{ The index of the icon in IconLocation }
property IconIndex: Integer read FIconIndex write FIconIndex default 0;
{ The file holding the icon. When empty the icon of the target is used }
property IconLocation: string read FIconLocation write FIconLocation;
{ The window state the target starts with }
property Show: TShellLinkShow read FShow write FShow default lsNormal;
{ The file, folder, or shell item the shortcut opens }
property Target: string read FTarget write FTarget;
{ The folder the target starts in }
property WorkingDirectory: string read FWorkingDirectory write FWorkingDirectory;
end;