Hello,
I've been asked to write a sort of "desktop clean-up" utility.
Requirements are simple: iterate through the shortcuts (*.lnk files) on the
currently logged-on user's desktop, and delete each link whose TargetPath
property no longer exists.
Iterating through the shortcuts on the desktop is easy enough using
Directory.GetFiles(*.lnk)
I found the following article which explains how to inspect the various
properties of a shortcut:
http://www.codeproject.com/useritems/Starter.asp
This uses COMInterop to inspect the shortcuts.
The author of the article says that he doesn't believe a managed solution is
available for this. Is this true?
I don't really have a problem using COMInterop but I guess I'd prefer to use
a managed solution if possible.
Does anyone know if there is one?
Thanks,
DJ