Icon information??
-
Hi, Can anybody help me to get Icon details like its name, target path, working directory whenever it is double-clicked to run the application. This is be using Windows API or in C#. I have already used IShellLink Interface but its been hard-coded for icon name. Suppose the user changes desktop icon name then also coding should be able to change its working directory. This can be done if I can check the existence of the icon. Regards. Chilly
-
Hi, Can anybody help me to get Icon details like its name, target path, working directory whenever it is double-clicked to run the application. This is be using Windows API or in C#. I have already used IShellLink Interface but its been hard-coded for icon name. Suppose the user changes desktop icon name then also coding should be able to change its working directory. This can be done if I can check the existence of the icon. Regards. Chilly
Hello
Sgg245 wrote:
get Icon details like its name, target path, working directory
I think you are talking more about shortcuts?? You mean those on the desktop? If you want to enumerate the links on the desktop:
Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "*.lnk");
Now, shortcuts are .ln; files and inside them you'd find the path to the program they excute. Read them using as FileStream, then use a Regex to find the text of the exe file, and/or anyother details you want.
Regards:rose: