1

This is confusing me a bit. I've recently set up a new PC at work and installed both TortoiseHg and Paint.NET, as usual. However, for some reason, all shortcuts to TortoiseHg are replaced with Paint.NET's application icon:

enter image description here

Reinstalling either application does not help, uninstalling Paint.NET does.

Clearing the icon cache by removing %LocalAppData%\IconCache.db does not help, either.

Now, all default shortcuts to TortoiseHg are shortcuts to the application itself, not a specific file path (which means I can't even change the icon of the shortcut):

enter image description here

My only guess right now is that perhaps Windows Installer is a bit confused about its application database, but I don't really have an idea how to verify or fix this.

The shortcut (and application icon in the registry) apparently references the icon at %SystemRoot%\Installer\{50AF3472-30AD-42C5-84FF-8A1ACE7CEFBF}\thgIcon.ico which is the correct one. {50AF3472-30AD-42C5-84FF-8A1ACE7CEFBF} is also the product GUID for TortoiseHg in the registry. So it appears that this product is correctly set up, as far as I can tell.

Joey
  • 40,002
  • 15
  • 104
  • 126
  • What is the icon path of that shortcut? You can get that from Change Icon option in Shortcut tab. – Biswapriyo Aug 15 '19 at 08:27
  • It looks like issue with icon cache. Try to delete this file `C:\Users\Joey\AppData\Local\IconCache.db` and restart explorer or sign out and sign in. – Biswapriyo Aug 15 '19 at 13:03
  • See if TortoiseHg has an entry in `C:\ProgramData\Microsoft\Windows\Start Menu\Programs` and if its icon can be changed. – harrymc Aug 15 '19 at 16:45
  • @harrymc: The screenshot of the property window is a shortcut from that exact place. There's also little point (albeit not impossible) for a program installed by MSI to have some shortcuts point to the application and some to a file path, as the latter won't work if the program is not installed. – Joey Aug 16 '19 at 06:48
  • Possible duplicate of [Icon Adobe Reader DC on taskbar is wrong](https://superuser.com/questions/996373/icon-adobe-reader-dc-on-taskbar-is-wrong) – Joey Aug 20 '19 at 08:22

2 Answers2

0

The workaround posted here did work for this case as well. Originally found that link in the issue thread for TortoiseHg and it seems to be a problem with Windows Installer shortcuts and the default application for icon files.

Joey
  • 40,002
  • 15
  • 104
  • 126
0

Icons in Windows Explorer are rendered (displayed) by the registered "Icon Rendering Application" object. If the "Icon Rendering Application" cannot understand the icon, it displays its own icon instead.

When Paint.NET cannot understand TortoiseHg icons, you see the Paint.NET icon instead.

Errors of this sort may be caused by a problem with TortoiseHg, fixed by re-installing TortoiseHg and clearing the icon cache, or may be caused by a problem with Paint.NET, fixed by using the file-association dialog to tell windows to use a different application to display icons (.ico files).

Andrew Morton
  • 2,957
  • 2
  • 20
  • 29
user165568
  • 575
  • 3
  • 10