After the strings comes the extra data: zero or more blocks, then a terminal block of four bytes with a value below 4. Each block starts with a 32-bit size and a 32-bit signature.
Older shortcuts often have no terminal block. In the 127 real shortcuts checked for this page, 43 end straight after their last block. A reader should accept both.
The blocks
0BlockSize the size of this block, this field included44BlockSignature which block this is48the block’s own fieldsvaries
| Signature | Block | Size | Holds |
|---|---|---|---|
0xA0000001 | EnvironmentVariableDataBlock | 0x314 | A path with environment variables. |
0xA0000002 | ConsoleDataBlock | 0xCC | Console window settings. |
0xA0000003 | TrackerDataBlock | 0x60 | Link tracking identifiers. |
0xA0000004 | ConsoleFEDataBlock | 0x0C | A console code page. |
0xA0000005 | SpecialFolderDataBlock | 0x10 | A special folder. |
0xA0000006 | DarwinDataBlock | 0x314 | A Windows Installer application identifier. |
0xA0000007 | IconEnvironmentDataBlock | 0x314 | An icon path with environment variables. |
0xA0000008 | ShimDataBlock | at least 0x88 | A compatibility shim layer name. |
0xA0000009 | PropertyStoreDataBlock | at least 0x0C | Properties of the target. |
0xA000000B | KnownFolderDataBlock | 0x1C | A known folder. |
0xA000000C | VistaAndAboveIDListDataBlock | at least 0x0A | An alternative IDList. |
ConsoleDataBlock
Display settings for a target that runs in a console window.
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 2 | FillAttributes | Text and background colours: bits 0–3 blue, green, red, intensity for the text, bits 4–7 the same for the background. |
| 10 | 2 | PopupFillAttributes | The same, for popups. |
| 12 | 2 | ScreenBufferSizeX | The screen buffer width, in characters. |
| 14 | 2 | ScreenBufferSizeY | The screen buffer height, in characters. |
| 16 | 2 | WindowSizeX | The window width, in characters. |
| 18 | 2 | WindowSizeY | The window height, in characters. |
| 20 | 2 | WindowOriginX | The window’s left position, in pixels. |
| 22 | 2 | WindowOriginY | The window’s top position, in pixels. |
| 24 | 4 | Unused1 | Undefined; ignored. |
| 28 | 4 | Unused2 | Undefined; ignored. |
| 32 | 4 | FontSize | The two high bytes give the font height, the two low bytes the width, in pixels. |
| 36 | 4 | FontFamily | A family (0x10 roman, 0x20 swiss, 0x30 modern, 0x40 script, 0x50 decorative) plus pitch bits (1 fixed, 2 vector, 4 TrueType, 8 device). |
| 40 | 4 | FontWeight | Below 700 is regular, 700 or more is bold. |
| 44 | 64 | Face Name | The font face name, 32 UTF-16 characters. |
| 108 | 4 | CursorSize | 25 or less small, 26 to 50 medium, 51 to 100 large. |
| 112 | 4 | FullScreen | Non-zero opens the console full screen. |
| 116 | 4 | QuickEdit | Non-zero turns QuickEdit on. |
| 120 | 4 | InsertMode | Non-zero turns insert mode on. |
| 124 | 4 | AutoPosition | Non-zero lets the system place the window. |
| 128 | 4 | HistoryBufferSize | The size of each history buffer, in characters. |
| 132 | 4 | NumberOfHistoryBuffers | The number of history buffers. |
| 136 | 4 | HistoryNoDup | Whether duplicates are allowed in the history: zero means not allowed, non-zero allowed (as MS-SHLLINK states). |
| 140 | 64 | ColorTable | Sixteen 32-bit RGB colours, which the fill attributes index. |
ConsoleFEDataBlock
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 4 | CodePage | The code page for showing text in a console window, as a language code identifier. |
DarwinDataBlock
An application identifier used instead of the target IDList to install an application when the link is activated.
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 260 | DarwinDataAnsi | The identifier in the system code page, zero-terminated. MS-SHLLINK says this should be ignored. |
| 268 | 520 | DarwinDataUnicode | The identifier in UTF-16, zero-terminated. Optional. |
EnvironmentVariableDataBlock
A path containing environment variables. Flag HasExpString says it is present.
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 260 | TargetAnsi | The path in the system code page, zero-terminated. |
| 268 | 520 | TargetUnicode | The path in UTF-16, zero-terminated. |
IconEnvironmentDataBlock
The same layout as the environment block, for the icon’s path.
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 260 | TargetAnsi | The icon path in the system code page, zero-terminated. |
| 268 | 520 | TargetUnicode | The icon path in UTF-16, zero-terminated. |
KnownFolderDataBlock
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 16 | KnownFolderID | The folder’s GUID. |
| 24 | 4 | Offset | Offset into the target IDList of the first item after the folder. |
SpecialFolderDataBlock
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 4 | SpecialFolderID | The folder’s integer ID (a CSIDL value). |
| 12 | 4 | Offset | Offset into the target IDList of the first item after the folder. |
ShimDataBlock
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | varies | LayerName | The name of a shim layer to apply when the target is activated, in UTF-16. |
TrackerDataBlock
Data for the Link Tracking service.
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | 4 | Length | The size of the rest of the block, this field included; must be 0x58. |
| 12 | 4 | Version | Must be zero. |
| 16 | 16 | MachineID | The NetBIOS name of the machine that last held the target, zero-terminated. |
| 32 | 32 | Droid | Two GUIDs, used to find the target with the Link Tracking service. |
| 64 | 32 | DroidBirth | Two GUIDs, used to find the target with the Link Tracking service. |
PropertyStoreDataBlock
After the block size and signature comes a serialized property store, defined in Microsoft’s MS-PROPSTORE: a sequence of property storages.
Each storage:
| Size | Name | Description |
|---|---|---|
| 4 | Storage Size | The size of this storage. Zero in the last, empty storage. |
| 4 | Version | Must be 0x53505331. |
| 16 | Format ID | A GUID for what the properties mean. {D5CDD505-2E9C-101B-9397-08002B2CF9AE} means properties named by strings; otherwise by integers. |
| varies | values | The serialized property values. |
Each value with an integer name:
| Size | Name | Description |
|---|---|---|
| 4 | Value Size | The size of this value. Zero in the last, empty value. |
| 4 | Id | The property’s number. |
| 1 | Reserved | Zero. |
| varies | Value | A typed value: a 16-bit VT type, two padding bytes, then the value. |
In a storage with string names, the Id is replaced by a 32-bit
Name Size, and a UTF-16 zero-terminated Name follows the
reserved byte. This site’s viewer shows values of the types VT_LPWSTR,
VT_LPSTR, VT_UI4, VT_I4, VT_BOOL,
VT_I8, VT_UI8, VT_CLSID and VT_FILETIME;
others appear as bytes.
VistaAndAboveIDListDataBlock
An alternative to the LinkTargetIDList, on platforms that support it.
| Offset | Size | Name | Description |
|---|---|---|---|
| 8 | varies | IDList | The same list as a LinkTargetIDList’s IDList, ended by a TerminalID. |
TerminalBlock
Four bytes, with a value below 4 (in practice, four zero bytes). MS-SHLLINK requires it, though real files from older systems often leave it out.