Class shortcutFile
Creates shell shortcuts (.lnk
files) and gets shortcut properties.
public sealed class shortcutFile : IDisposable
Namespace: Au
Assembly: Au.dll
Properties
Name | Description |
---|---|
Arguments | Gets or sets the command-line arguments. |
Description | Gets or sets the description text (comment). |
Hotkey | Gets or sets hotkey. |
ShowState | Gets or sets the window show state. Most programs ignore it. |
TargetAnyType | Gets or sets target of any type - file/folder, URL, virtual shell object (see Pidl). The string can be used with run.it. |
TargetPath | Gets or sets shortcut target path. |
TargetPathRawMSI | Gets shortcut target path and does not correct wrong MSI shortcut target. |
TargetPidl | Gets or sets a non-file-system target (eg Control Panel) through its ITEMIDLIST. |
TargetURL | Gets or sets a URL target.
Note: it is a |
WorkingDirectory | Gets or sets the working directory path. |
Methods
Name | Description |
---|---|
Dispose() | Releases internally used COM objects (IShellLink, IPersistFile). |
GetIconLocation(out int) | Gets custom icon file path and icon index. |
Save() | Saves to the shortcut file ( |
SetIconLocation(string, int) | Sets icon file path and icon index. |
create(string) | Creates a new shortcutFile instance that can be used to create or replace a shortcut file. |
delete(string) | If shortcut file exists, unregisters its hotkey and deletes it. |
getTarget(string) | Gets shortcut target path or URL or virtual shell object ITEMIDLIST. Uses shortcutFile.open and shortcutFile.TargetAnyType. |
open(string) | Opens a shortcut file ( |
openOrCreate(string) | Creates a new shortcutFile instance that can be used to create or modify a shortcut file. |