0

I created several web folders for access to WebDAV and SharePoint. My Network Shortcuts folder is located here:

C:\Users\elan\AppData\Roaming\Microsoft\Windows\Network Shortcuts

Each web folder that I had created/defined is listed in the Network Shortcuts folder as a directory shortcut. When I right click on the properties of each of these shortcuts, it gives me the details of the web folder connection, specifically I can get the following information:

1. Target:  "http://171.23.242.24:23352/test"
2. Comment: "\\171.23.242.24@23352\DavWWWRoot\test" 

How can I get access to these properties in C#?

Elan
  • 6,084
  • 12
  • 64
  • 84
  • possible duplicate of [How to resolve a .lnk in c#](http://stackoverflow.com/questions/139010/how-to-resolve-a-lnk-in-c-sharp) – Polynomial Jan 20 '12 at 16:19
  • @Polynomial: That works and gets me the "Comment" property in my question. I am now looking for how to access the "Target" property of the link. – Elan Jan 20 '12 at 17:22
  • `GetPath` gives you the target. `GetDescription` gives you the comment. – Polynomial Jan 20 '12 at 17:26
  • @Polynomial: The data I get back from both `GetPath` and `GetDescription` are the same and when I compare it to the properties dialog on Windows, they match up with the `Comment` field. This is what I ran: `IShellLinkW linkw = (IShellLinkW)link; Console.WriteLine("Path: " + sb.ToString()); StringBuilder buff = new StringBuilder(4098); linkw.GetDescription(buff, 4098); – Elan Jan 20 '12 at 17:43

0 Answers0