I want to show a dialog that will allow the user to select a shortcut (.lnk) file. My problem is that the dialog tries to get the file/URL the shortcut is pointing to rather then the .lnk file itself.
How can I make it allow .lnk files to be selected?
You can use the
OpenFileDialog.DereferenceLinksproperty to influence that behaviour (see doc).or
Both methods yield a
.lnkfile, however the first approach allows the selection of.lnkfiles or normal files, while the second only selects.lnkfiles.