How to get URL from .lnk shortcut file?

I

info2knowledge

Any idea how to get the url reference from a shortcut file using
vb.net? The program can access the file name (ending in .lnk), but not
sure how to take it to the next step...
 
I

info2knowledge

So, does that mean that each Internet Shortcut in the Favorites folder
has a corresponding URL in an .INI file somewhere? Any idea what that
..ini file would be called?
 
H

Herfried K. Wagner [MVP]

So, does that mean that each Internet Shortcut in the Favorites folder
has a corresponding URL in an .INI file somewhere?

No, the ".lnk" file's content is formatted in the INI format.
 
I

info2knowledge

Thanks! I finally got it (sorry, guess I'm a bit slow :)

The .url files are really .ini files and you can use the
getPrivateProfileString to get the values from that file...

Do you think it'll mess up anything if I insert additional sections &
keys into the .url files?
 
H

Herfried K. Wagner [MVP]

The .url files are really .ini files and you can use the
getPrivateProfileString to get the values from that file...

Do you think it'll mess up anything if I insert additional sections &
keys into the .url files?

I have never tested that, but I assume it won't mess up anything, especially
if you add them at the end of the files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top