Wrong file icon, Windows 10
Moderators: Hacker, petermad, Stefan2, white
Wrong file icon, Windows 10
At Windows 10 files have wrong (blank) icons in TC before them association is "confirmed".
This is very annoying, especial for those ones, which should not (e.g. build artifacts) or rarely are opened by double-click, so user confirmation may happen not very soon.
https://1drv.ms/u/s!AqDlJAwxGUl1g1qbb9bgnuPc_b_E
Arrrhh!! posting image in this forum is very complicated sometimes!
This is very annoying, especial for those ones, which should not (e.g. build artifacts) or rarely are opened by double-click, so user confirmation may happen not very soon.
https://1drv.ms/u/s!AqDlJAwxGUl1g1qbb9bgnuPc_b_E
Arrrhh!! posting image in this forum is very complicated sometimes!
2Horst.Epp
Look at screenshot. I have new installation of Win10 and Visual Studio 2017 on it.
vcxproj, filters have no icons. Even cpp and h had no icons before I double-clicked them and "confirm" VS association.
Also (semi-offtop) file -> open with (not internal, but System associations in TC) shows only those types, which have "open" verb.
Look at screenshot. I have new installation of Win10 and Visual Studio 2017 on it.
vcxproj, filters have no icons. Even cpp and h had no icons before I double-clicked them and "confirm" VS association.
Also (semi-offtop) file -> open with (not internal, but System associations in TC) shows only those types, which have "open" verb.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This can happen when there is no defined association for the extension, but instead the key "percievedtypes" is used. Total Commander currently ignores this key because there is no association defined yet. All it does it prompt the user to pick a program.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately it's not so easy because I don't currently have any programs installed with this problem, so I cannot replicate it here. I'm using Visual Studio 2005 (for backwards compatibility with Windows XP), and it doesn't have this problem.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Is there any small program with this problem? VS 2017 is huge, and I also fear that it will break my VS2005 installation.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Well, the simplest way to reproduce, is import such reg file
and create dummy.txttest file. This accurately imitates my case with VS2017@Win10
Explorer will show icon, TC does not
I don't know, how you load icons. What about SHGetFileInfo (slow) or IExtractIcon (more fast and flexible)?
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.txttest]
"PerceivedType"="text"
"Content Type"="text/plain"
[HKEY_CLASSES_ROOT\.txttest\OpenWithProgids]
"txtfile"=""
Explorer will show icon, TC does not
I don't know, how you load icons. What about SHGetFileInfo (slow) or IExtractIcon (more fast and flexible)?
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Good, but not enough.
Sorry for incorrect test case. Just discovered this on another file type (packages.config for example)
Try to remove PerceivedType - Explorer will show icon, TC does not
I suppose that icon is chosen by first (completely not sure) entry of OpenWithProgids
Offtop: file association became so unclear since XP(
Sorry for incorrect test case. Just discovered this on another file type (packages.config for example)
Try to remove PerceivedType - Explorer will show icon, TC does not
I suppose that icon is chosen by first (completely not sure) entry of OpenWithProgids
Offtop: file association became so unclear since XP(
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I have created a new type .txttest2 with just the OpenWithProgIDs key. Indeed Windows then uses the icon from that entry. However, it's not clear which icon it uses when there are multiple entries under OpenWithProgIDs, e.g.
txtfile
soffice.StarWriterDocument.6
Here Explorer uses the LibreOffice icon, although when I double click, I get a chooser dialog. And when I then choose Notepad, and don't set it as the default via checkbox, Windows still picks notepad on the next double click - but the icon remains as the one from LibreOffice. There is also no change to the registry.
txtfile
soffice.StarWriterDocument.6
Here Explorer uses the LibreOffice icon, although when I double click, I get a chooser dialog. And when I then choose Notepad, and don't set it as the default via checkbox, Windows still picks notepad on the next double click - but the icon remains as the one from LibreOffice. There is also no change to the registry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, this should work better in Total Commander 9.20 beta 4, please check! However, it's still not clear what should happen when there is more than one entry in OpenWithProgIDs. Currently I use these rules:
1. Computer\HKEY_CLASSES_ROOT\.txttest\OpenWithProgIDs has only one entry -> use that
2. Computer\HKEY_CLASSES_ROOT\.txttest\OpenWithProgIDs has more than one entry
-> use alphabetically first from OpenWithProgIDs
3. It seems that Explorer uses entries from here:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txttest\OpenWithList
If it is not empty, Explorer gets first character from MRUList, e.g. -> 'a'. Then it gets value of 'a', e.g. soffice.bin.
But then I'm stuck - there is no key named soffice.bin (libreoffice), but Explorer still finds the right icon.
Btw, if the key from 3. is there buit the one from 1+2 is missing, Explorer does NOT use it.
1. Computer\HKEY_CLASSES_ROOT\.txttest\OpenWithProgIDs has only one entry -> use that
2. Computer\HKEY_CLASSES_ROOT\.txttest\OpenWithProgIDs has more than one entry
-> use alphabetically first from OpenWithProgIDs
3. It seems that Explorer uses entries from here:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txttest\OpenWithList
If it is not empty, Explorer gets first character from MRUList, e.g. -> 'a'. Then it gets value of 'a', e.g. soffice.bin.
But then I'm stuck - there is no key named soffice.bin (libreoffice), but Explorer still finds the right icon.
Btw, if the key from 3. is there buit the one from 1+2 is missing, Explorer does NOT use it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com