Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1088
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

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