We have users that rename the shortcut file on their desktop to our application. What is the best way to delete/modify the shortcut based on targetpath if the icon changes for the application? In other words, I’m having a hard time locating the file name because it keeps getting changed.
Share
You should use FileSystemWatcher class:
Infact you can exploit
FileSystemWatcher.Changed,FileSystemWatcher.Created,FileSystemWatcher.Renamed,FileSystemWatcher.Deletedevents to keep control on your file.Here is an example by MSDN: