What is inside a .lnk file? How does it work? The Next CEO of Stack OverflowIs a .lnk file a...

Is a linearly independent set whose span is dense a Schauder basis?

Small nick on power cord from an electric alarm clock, and copper wiring exposed but intact

Find the majority element, which appears more than half the time

What happens if you break a law in another country outside of that country?

Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?

Shortening a title without changing its meaning

Is the 21st century's idea of "freedom of speech" based on precedent?

Identify and count spells (Distinctive events within each group)

Can a PhD from a non-TU9 German university become a professor in a TU9 university?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

Is it possible to create a QR code using text?

Why was Sir Cadogan fired?

Is it OK to decorate a log book cover?

How did scripture get the name bible?

How dangerous is XSS

Is it "common practice in Fourier transform spectroscopy to multiply the measured interferogram by an apodizing function"? If so, why?

How can a day be of 24 hours?

My boss doesn't want me to have a side project

How should I connect my cat5 cable to connectors having an orange-green line?

Read/write a pipe-delimited file line by line with some simple text manipulation

Are British MPs missing the point, with these 'Indicative Votes'?

Mathematica command that allows it to read my intentions

A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?

Compensation for working overtime on Saturdays



What is inside a .lnk file? How does it work?



The Next CEO of Stack OverflowIs a .lnk file a symbolic link or a junction?Batch deletion of smaller files from group of files via unix command lineHow synchronize two disks (or folders) using symbolic (or hard) links (like rsync)?How do I fix .lnk files on windows vista?What file extensions does ffmpeg support?Where does Internet Explorer store the last used upload directory?Executable lauches if called directly from terminal, but does not work when called from shell scriptWindows- how do I create my own file extensions, and associate them with my own program?Setting a default program for extensionless filesdoes PATH search include symlinks?Is it safe to delete files with extensions containing non-alphanumeric characters?












0















I noticed that windows does not show the size of folders, however the size of files. Creating a shortcut however seems to create a new folder by the looks, however it shows that it is actually a file, that just shares the same look as folders on the GUI.



After some quick research I found: Is a .lnk file a symbolic link or a junction?



Which seemed to confirm my first guess. There was also an answer suggesting to simply drag an .lnk file into a txt editor - I did so, but what disappointed as the txt inside the .lnk file was just not readable.



Now I am just curious, if there was a way to actually decypher the file and understand its inner workings. As much as I got thus far, it is just a simple reference to another file or folder. However considering its 2KB size, it seems to me being unexpectedly big.



So what is exactly in the file? How does the reference work? How does it open the file referenced and not the file itself, when selecting?










share|improve this question























  • See this article Wikipedia:Shortcut. You may open that lnk file in hex editor to see the readable section.

    – Biswapriyo
    Aug 19 '17 at 16:34











  • A lnk file is a link to a data object which may be something other than a file. Developers don't normally access the file contents directly but use system functions to create, modify, and access information. I believe the contents are documented by Microsoft somewhere. There have been many versions of the file type over the years making direct access difficult. Windows Explorer recognizes the file type and acts according to the contents

    – LMiller7
    Aug 19 '17 at 19:27
















0















I noticed that windows does not show the size of folders, however the size of files. Creating a shortcut however seems to create a new folder by the looks, however it shows that it is actually a file, that just shares the same look as folders on the GUI.



After some quick research I found: Is a .lnk file a symbolic link or a junction?



Which seemed to confirm my first guess. There was also an answer suggesting to simply drag an .lnk file into a txt editor - I did so, but what disappointed as the txt inside the .lnk file was just not readable.



Now I am just curious, if there was a way to actually decypher the file and understand its inner workings. As much as I got thus far, it is just a simple reference to another file or folder. However considering its 2KB size, it seems to me being unexpectedly big.



So what is exactly in the file? How does the reference work? How does it open the file referenced and not the file itself, when selecting?










share|improve this question























  • See this article Wikipedia:Shortcut. You may open that lnk file in hex editor to see the readable section.

    – Biswapriyo
    Aug 19 '17 at 16:34











  • A lnk file is a link to a data object which may be something other than a file. Developers don't normally access the file contents directly but use system functions to create, modify, and access information. I believe the contents are documented by Microsoft somewhere. There have been many versions of the file type over the years making direct access difficult. Windows Explorer recognizes the file type and acts according to the contents

    – LMiller7
    Aug 19 '17 at 19:27














0












0








0








I noticed that windows does not show the size of folders, however the size of files. Creating a shortcut however seems to create a new folder by the looks, however it shows that it is actually a file, that just shares the same look as folders on the GUI.



After some quick research I found: Is a .lnk file a symbolic link or a junction?



Which seemed to confirm my first guess. There was also an answer suggesting to simply drag an .lnk file into a txt editor - I did so, but what disappointed as the txt inside the .lnk file was just not readable.



Now I am just curious, if there was a way to actually decypher the file and understand its inner workings. As much as I got thus far, it is just a simple reference to another file or folder. However considering its 2KB size, it seems to me being unexpectedly big.



So what is exactly in the file? How does the reference work? How does it open the file referenced and not the file itself, when selecting?










share|improve this question














I noticed that windows does not show the size of folders, however the size of files. Creating a shortcut however seems to create a new folder by the looks, however it shows that it is actually a file, that just shares the same look as folders on the GUI.



After some quick research I found: Is a .lnk file a symbolic link or a junction?



Which seemed to confirm my first guess. There was also an answer suggesting to simply drag an .lnk file into a txt editor - I did so, but what disappointed as the txt inside the .lnk file was just not readable.



Now I am just curious, if there was a way to actually decypher the file and understand its inner workings. As much as I got thus far, it is just a simple reference to another file or folder. However considering its 2KB size, it seems to me being unexpectedly big.



So what is exactly in the file? How does the reference work? How does it open the file referenced and not the file itself, when selecting?







shell file-extension






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 19 '17 at 15:46









ImagoImago

1013




1013













  • See this article Wikipedia:Shortcut. You may open that lnk file in hex editor to see the readable section.

    – Biswapriyo
    Aug 19 '17 at 16:34











  • A lnk file is a link to a data object which may be something other than a file. Developers don't normally access the file contents directly but use system functions to create, modify, and access information. I believe the contents are documented by Microsoft somewhere. There have been many versions of the file type over the years making direct access difficult. Windows Explorer recognizes the file type and acts according to the contents

    – LMiller7
    Aug 19 '17 at 19:27



















  • See this article Wikipedia:Shortcut. You may open that lnk file in hex editor to see the readable section.

    – Biswapriyo
    Aug 19 '17 at 16:34











  • A lnk file is a link to a data object which may be something other than a file. Developers don't normally access the file contents directly but use system functions to create, modify, and access information. I believe the contents are documented by Microsoft somewhere. There have been many versions of the file type over the years making direct access difficult. Windows Explorer recognizes the file type and acts according to the contents

    – LMiller7
    Aug 19 '17 at 19:27

















See this article Wikipedia:Shortcut. You may open that lnk file in hex editor to see the readable section.

– Biswapriyo
Aug 19 '17 at 16:34





See this article Wikipedia:Shortcut. You may open that lnk file in hex editor to see the readable section.

– Biswapriyo
Aug 19 '17 at 16:34













A lnk file is a link to a data object which may be something other than a file. Developers don't normally access the file contents directly but use system functions to create, modify, and access information. I believe the contents are documented by Microsoft somewhere. There have been many versions of the file type over the years making direct access difficult. Windows Explorer recognizes the file type and acts according to the contents

– LMiller7
Aug 19 '17 at 19:27





A lnk file is a link to a data object which may be something other than a file. Developers don't normally access the file contents directly but use system functions to create, modify, and access information. I believe the contents are documented by Microsoft somewhere. There have been many versions of the file type over the years making direct access difficult. Windows Explorer recognizes the file type and acts according to the contents

– LMiller7
Aug 19 '17 at 19:27










1 Answer
1






active

oldest

votes


















0














Command Prompt thinks of a .lnk file like a file and not a shortcut. Renaming the file to something.txt will let you open it. This is what is inside a shortcut that links to system32.



L À F‹ )±ØÑÓ/ÿSçÔ/ÿSçÔ ß PàOÐ ê:i¢Ø +00 /C: V 1 lN
Windows @ ヒL‘¨lN
. 7è åÃm W i n d o w s Z 1 ~Nã¾ System32 B ヒL‘¨~Nã¾. ý $ Ñ# S y s t e m 3 2 F 1 E ”´'Î Acer C:WindowsSystem32 . . . . . . W i n d o w s S y s t e m 3 2  % Ý  wNÁç]N·D.±®Q˜·Ý  X thekerrklan ÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkGÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkG  I 1SPSí0½ÚC ‰G§øФsf"- d

W i n d o w s ( C : ) ‰ 1SPSâŠXF¼L8C»ü“&˜mÎm . S - 1 - 5 - 2 1 - 7 2 6 1 2 9 4 9 5 - 2 1 3 2 9 2 1 4 0 6 - 3 3 7 0 9 9 2 9 6 3 - 1 0 2 7 ” 1SPS0ñ%·ïG¥ñ
Œžë¬%

S y s t e m 3 2 @ 4±ØÑÓ) F i l e f o l d e r @ /ÿSçÔ U 1SPS¦jc(=•ÒµÖ ÀOÙÐ9 C : W i n d o w s S y s t e m 3 2 9 1SPS±mD­pH§H@.¤=xŒ h H X?ªÇƒwHB‡GW»½ùæ






share|improve this answer








New contributor




Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • The question says that the OP was able to inspect the contents of a .lnk file by dragging it into a text editor, so your answer doesn’t appear to contribute anything.  The question asks how to interpret the contents of a .lnk file, and how do they work (what is the mechanism by which programs get access to the linked-to file).

    – Scott
    1 hour ago














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1242505%2fwhat-is-inside-a-lnk-file-how-does-it-work%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Command Prompt thinks of a .lnk file like a file and not a shortcut. Renaming the file to something.txt will let you open it. This is what is inside a shortcut that links to system32.



L À F‹ )±ØÑÓ/ÿSçÔ/ÿSçÔ ß PàOÐ ê:i¢Ø +00 /C: V 1 lN
Windows @ ヒL‘¨lN
. 7è åÃm W i n d o w s Z 1 ~Nã¾ System32 B ヒL‘¨~Nã¾. ý $ Ñ# S y s t e m 3 2 F 1 E ”´'Î Acer C:WindowsSystem32 . . . . . . W i n d o w s S y s t e m 3 2  % Ý  wNÁç]N·D.±®Q˜·Ý  X thekerrklan ÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkGÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkG  I 1SPSí0½ÚC ‰G§øФsf"- d

W i n d o w s ( C : ) ‰ 1SPSâŠXF¼L8C»ü“&˜mÎm . S - 1 - 5 - 2 1 - 7 2 6 1 2 9 4 9 5 - 2 1 3 2 9 2 1 4 0 6 - 3 3 7 0 9 9 2 9 6 3 - 1 0 2 7 ” 1SPS0ñ%·ïG¥ñ
Œžë¬%

S y s t e m 3 2 @ 4±ØÑÓ) F i l e f o l d e r @ /ÿSçÔ U 1SPS¦jc(=•ÒµÖ ÀOÙÐ9 C : W i n d o w s S y s t e m 3 2 9 1SPS±mD­pH§H@.¤=xŒ h H X?ªÇƒwHB‡GW»½ùæ






share|improve this answer








New contributor




Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • The question says that the OP was able to inspect the contents of a .lnk file by dragging it into a text editor, so your answer doesn’t appear to contribute anything.  The question asks how to interpret the contents of a .lnk file, and how do they work (what is the mechanism by which programs get access to the linked-to file).

    – Scott
    1 hour ago


















0














Command Prompt thinks of a .lnk file like a file and not a shortcut. Renaming the file to something.txt will let you open it. This is what is inside a shortcut that links to system32.



L À F‹ )±ØÑÓ/ÿSçÔ/ÿSçÔ ß PàOÐ ê:i¢Ø +00 /C: V 1 lN
Windows @ ヒL‘¨lN
. 7è åÃm W i n d o w s Z 1 ~Nã¾ System32 B ヒL‘¨~Nã¾. ý $ Ñ# S y s t e m 3 2 F 1 E ”´'Î Acer C:WindowsSystem32 . . . . . . W i n d o w s S y s t e m 3 2  % Ý  wNÁç]N·D.±®Q˜·Ý  X thekerrklan ÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkGÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkG  I 1SPSí0½ÚC ‰G§øФsf"- d

W i n d o w s ( C : ) ‰ 1SPSâŠXF¼L8C»ü“&˜mÎm . S - 1 - 5 - 2 1 - 7 2 6 1 2 9 4 9 5 - 2 1 3 2 9 2 1 4 0 6 - 3 3 7 0 9 9 2 9 6 3 - 1 0 2 7 ” 1SPS0ñ%·ïG¥ñ
Œžë¬%

S y s t e m 3 2 @ 4±ØÑÓ) F i l e f o l d e r @ /ÿSçÔ U 1SPS¦jc(=•ÒµÖ ÀOÙÐ9 C : W i n d o w s S y s t e m 3 2 9 1SPS±mD­pH§H@.¤=xŒ h H X?ªÇƒwHB‡GW»½ùæ






share|improve this answer








New contributor




Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • The question says that the OP was able to inspect the contents of a .lnk file by dragging it into a text editor, so your answer doesn’t appear to contribute anything.  The question asks how to interpret the contents of a .lnk file, and how do they work (what is the mechanism by which programs get access to the linked-to file).

    – Scott
    1 hour ago
















0












0








0







Command Prompt thinks of a .lnk file like a file and not a shortcut. Renaming the file to something.txt will let you open it. This is what is inside a shortcut that links to system32.



L À F‹ )±ØÑÓ/ÿSçÔ/ÿSçÔ ß PàOÐ ê:i¢Ø +00 /C: V 1 lN
Windows @ ヒL‘¨lN
. 7è åÃm W i n d o w s Z 1 ~Nã¾ System32 B ヒL‘¨~Nã¾. ý $ Ñ# S y s t e m 3 2 F 1 E ”´'Î Acer C:WindowsSystem32 . . . . . . W i n d o w s S y s t e m 3 2  % Ý  wNÁç]N·D.±®Q˜·Ý  X thekerrklan ÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkGÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkG  I 1SPSí0½ÚC ‰G§øФsf"- d

W i n d o w s ( C : ) ‰ 1SPSâŠXF¼L8C»ü“&˜mÎm . S - 1 - 5 - 2 1 - 7 2 6 1 2 9 4 9 5 - 2 1 3 2 9 2 1 4 0 6 - 3 3 7 0 9 9 2 9 6 3 - 1 0 2 7 ” 1SPS0ñ%·ïG¥ñ
Œžë¬%

S y s t e m 3 2 @ 4±ØÑÓ) F i l e f o l d e r @ /ÿSçÔ U 1SPS¦jc(=•ÒµÖ ÀOÙÐ9 C : W i n d o w s S y s t e m 3 2 9 1SPS±mD­pH§H@.¤=xŒ h H X?ªÇƒwHB‡GW»½ùæ






share|improve this answer








New contributor




Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










Command Prompt thinks of a .lnk file like a file and not a shortcut. Renaming the file to something.txt will let you open it. This is what is inside a shortcut that links to system32.



L À F‹ )±ØÑÓ/ÿSçÔ/ÿSçÔ ß PàOÐ ê:i¢Ø +00 /C: V 1 lN
Windows @ ヒL‘¨lN
. 7è åÃm W i n d o w s Z 1 ~Nã¾ System32 B ヒL‘¨~Nã¾. ý $ Ñ# S y s t e m 3 2 F 1 E ”´'Î Acer C:WindowsSystem32 . . . . . . W i n d o w s S y s t e m 3 2  % Ý  wNÁç]N·D.±®Q˜·Ý  X thekerrklan ÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkGÞMã‰üܬC¶ðÛ+ ¿lŸÚ–|îì)é¿ÆHÒ$UkG  I 1SPSí0½ÚC ‰G§øФsf"- d

W i n d o w s ( C : ) ‰ 1SPSâŠXF¼L8C»ü“&˜mÎm . S - 1 - 5 - 2 1 - 7 2 6 1 2 9 4 9 5 - 2 1 3 2 9 2 1 4 0 6 - 3 3 7 0 9 9 2 9 6 3 - 1 0 2 7 ” 1SPS0ñ%·ïG¥ñ
Œžë¬%

S y s t e m 3 2 @ 4±ØÑÓ) F i l e f o l d e r @ /ÿSçÔ U 1SPS¦jc(=•ÒµÖ ÀOÙÐ9 C : W i n d o w s S y s t e m 3 2 9 1SPS±mD­pH§H@.¤=xŒ h H X?ªÇƒwHB‡GW»½ùæ







share|improve this answer








New contributor




Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered 2 hours ago









Xman10110Xman10110

1




1




New contributor




Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Xman10110 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • The question says that the OP was able to inspect the contents of a .lnk file by dragging it into a text editor, so your answer doesn’t appear to contribute anything.  The question asks how to interpret the contents of a .lnk file, and how do they work (what is the mechanism by which programs get access to the linked-to file).

    – Scott
    1 hour ago





















  • The question says that the OP was able to inspect the contents of a .lnk file by dragging it into a text editor, so your answer doesn’t appear to contribute anything.  The question asks how to interpret the contents of a .lnk file, and how do they work (what is the mechanism by which programs get access to the linked-to file).

    – Scott
    1 hour ago



















The question says that the OP was able to inspect the contents of a .lnk file by dragging it into a text editor, so your answer doesn’t appear to contribute anything.  The question asks how to interpret the contents of a .lnk file, and how do they work (what is the mechanism by which programs get access to the linked-to file).

– Scott
1 hour ago







The question says that the OP was able to inspect the contents of a .lnk file by dragging it into a text editor, so your answer doesn’t appear to contribute anything.  The question asks how to interpret the contents of a .lnk file, and how do they work (what is the mechanism by which programs get access to the linked-to file).

– Scott
1 hour ago




















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1242505%2fwhat-is-inside-a-lnk-file-how-does-it-work%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...