07-02-2008, 04:05 PM
Shortcut was our first guest but "icons problem" is more complicated.
When you've got a shortcut to any item Windows is always trying to retrieve an icon for it. For non-executable files this is an icon of associated application. For executables Windows is looking for included images and if the search is success, you will see it.
The source of the problem is that you have many ways to get LNK file for loading an application:
1. Direct link to EXE file (Target: C:\Program Files\Skype\Phone\Skype.exe).
2. Complete executable name (Target: Skype.exe) and the path to it (Starting path: C:\Program Files\Skype\Phone\)
In that case Windows will look for Skype.exe under "C:\Program Files\Skype\Phone\" directory.
3. Executable name (Target: Skype) and the path to it (Starting path: C:\Program Files\Skype\Phone\)
In that case Windows will look for Skype.exe, Skype.com or Skype.bat under "C:\Program Files\Skype\Phone\" directory.
4. Executable name without path (Target: iTunes).
Windows will look for iTunes.exe, iTunes.com or iTunes.bat under system specific directories:
- folders defined for PATH environment variable (written in c:\autoexec.bat file),
- C:\Windows\
- C:\Windows\system32\
- registry entry called "iTunes.exe" or "iTunes" under HKEY_CLASSES_ROOT\Applications\.
As you can see above: plenty of ways and even if they work for loading an application, they might not work for icons.
For the end: take a look on Skype's shortcut and 3rd point.
Theoretically Windows should retrieve an icon from:
C:\Program Files\Skype\Skype™ 3.8.exe
what is nonsense because such file does not exist.
After all: I am still amazed that this shortcut works for starting it!
When you've got a shortcut to any item Windows is always trying to retrieve an icon for it. For non-executable files this is an icon of associated application. For executables Windows is looking for included images and if the search is success, you will see it.
The source of the problem is that you have many ways to get LNK file for loading an application:
1. Direct link to EXE file (Target: C:\Program Files\Skype\Phone\Skype.exe).
2. Complete executable name (Target: Skype.exe) and the path to it (Starting path: C:\Program Files\Skype\Phone\)
In that case Windows will look for Skype.exe under "C:\Program Files\Skype\Phone\" directory.
3. Executable name (Target: Skype) and the path to it (Starting path: C:\Program Files\Skype\Phone\)
In that case Windows will look for Skype.exe, Skype.com or Skype.bat under "C:\Program Files\Skype\Phone\" directory.
4. Executable name without path (Target: iTunes).
Windows will look for iTunes.exe, iTunes.com or iTunes.bat under system specific directories:
- folders defined for PATH environment variable (written in c:\autoexec.bat file),
- C:\Windows\
- C:\Windows\system32\
- registry entry called "iTunes.exe" or "iTunes" under HKEY_CLASSES_ROOT\Applications\.
As you can see above: plenty of ways and even if they work for loading an application, they might not work for icons.
For the end: take a look on Skype's shortcut and 3rd point.
Theoretically Windows should retrieve an icon from:
C:\Program Files\Skype\Skype™ 3.8.exe
what is nonsense because such file does not exist.
After all: I am still amazed that this shortcut works for starting it!


![[Image: dc85x15_philkc_fade22lr.png]](http://www.donationcoder.com/About/linkimages/small/dc85x15_philkc_fade22lr.png)