Fandom

File Formats Wiki

Shortcut

261pages on
this wiki
Add New Page
Talk0 Share
Shortcut
Blank

Filename extension .lnk
File formats category - v  e   edit
Smallwikipedialogo.png Wikipedia has an article related to:

The Windows shortcut is used to point to files, directories, and even online URIs.

SpecificationEdit

HeaderEdit

Offset Size Description
0 (0) 4 0x00 00 00 4c, used to identify the shortcut file (reads "␀␀␀L", C "\0\0\0L")
4 (4) 16 (GUID) 00021401-0000-0000-00c0-000000000046, GUID of shortcut files
20 (14) 4 Flags that specify which parts of the file are present
24 (18) 4 Attributes of the target file
28 (1C) 8 Time created
36 (24) 8 Time last modified
44 (2C) 8 Time last accessed
52 (34) 4 Length of target file (32-bit integer)
56 (38) 4 Icon index (icon is selected from a list of icons)
60 (3C) 4 ShowWnd value passed to the application when the target file is opened
64 (40) 4 Hotkey assigned to this shortcut
68 (44) 8 0x0...0 padding

FlagsEdit

Bit - description when set

  • 0 - shell item ID list present
  • 1 - points to file or directory
  • 2 - has description string
  • 3 - has relative path
  • 4 - has working directory
  • 5 - has command-line arguments
  • 6 - has custom icon

AttributesEdit

Bit - description (of target file) when set

  • 0 - read-only
  • 1 - hidden
  • 2 - system file
  • 3 - volume label
  • 4 - directory
  • 5 - target archive changed
  • 6 - encrypted (NTFS EFS)
  • 7 - none
  • 8 - temporary
  • 9 - sparse file
  • 10 - has reparse point data
  • 11 - offline

Shell item ID listEdit

This indicates how to get from the desktop to the specified item. The first unsigned short integer indicates the total length of the list so it can be skipped easily. Inside the list, each item begins with an unsigned short integer that indicates the length of the item. The length includes the size of the length value. The last item is length 0.

ReferencesEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.