Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1083
  • Last Modified:

LNK and Shortcut format

Does anyone know the layout of a .LNK shortcut file? I need to know how to read the path, executable, default directory, title, icon location, etc. from the raw file. Hopefully a "C" structure format.
0
MorrisR
Asked:
MorrisR
  • 3
1 Solution
 
scrapdogCommented:
0
 
MorrisRAuthor Commented:
I already have the LNK.ZIP from that site. The example doesn't provide me with all the details of a LNK file. A LNK file is not that big. I can see the sections: comment, start directory, executable, path, volume label, parameters being passed, where the display icon come from, etc. However, I can see and understand these things visually because I know what I set them too - but I can not understand the pattern in which they are placed. I can see a DWORD for size and then a non null terminated text field. I need to decipher them programmatically.
0
 
scrapdogCommented:
I can't really help you here.

But with there being a non-null terminated text field, I can infer that either the string is of fixed-length, or the size of the string is stored somewhere in the file (kind of like the way pascal strings are stored).

Your best bet is to run several LNK files thru a hex editor and see if this is a fixed length string.  If not, find out how long the text string is, then search for that byte that represents this length in the file.  If it is consistent, between files, chances are that this is the place where the length of the string is stored.

You probably would have been wise to reject the answer if it didn't work for you.  Now if anyone knows the answer, they will have to post it in the form of a comment, AND they will have to pay the 10 PAQ points to see the question.  So I suppose that you will have to post another question in order for others to see it.  

I will help you if I can.

0
 
scrapdogCommented:
I posted a message at customer service to see if they can unaccept the question or get your points back.
0
 
linda101698Commented:
Thanks scrapdog for following up on this question.

MorrisR
I have added the points assigned to this question back to his account so he can post another question.

Linda Gardner
Customer Service @ Experts Exchange
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now