Getting Icon information from which application is run
-
I have an application whose shortcut is placed on the desktop. Now whenever i double-click that icon, I want to get the information for that icon like Icon name, Icon target path, Icon working directory. The reason behind this is from one of the functionality the working directory changes for the application. So through Windows API or in C#/C++ I want to change the working directory for the icon which is double-clicked. Plz guide me soon and at the earliest, if possible. Regards. Chilly
-
I have an application whose shortcut is placed on the desktop. Now whenever i double-click that icon, I want to get the information for that icon like Icon name, Icon target path, Icon working directory. The reason behind this is from one of the functionality the working directory changes for the application. So through Windows API or in C#/C++ I want to change the working directory for the icon which is double-clicked. Plz guide me soon and at the earliest, if possible. Regards. Chilly
you can resolve an icon information using the
IShellLink
interface methods:Resolve(), GetPath(), GetDescription()
etc. For this u need to pass the sortcut path. But for resolving it on icon click, u may need to write a mouse hook dll or a shell extension. cheers..milton kb.