Updated program icon is not properly reflected
Moderators: Hacker, petermad, Stefan2, white
Updated program icon is not properly reflected
Steps to reproduce:
1. Build a program with a linked program icon resource A.
2. Use a different icon B and rebuild the program.
3. If the program path doesn't change, it still shows icon A in full view and (worse) the Alt+Enter dialog.
Windows explorer always reflects the icon update. And the icon will be properly shown in Total Commander if the program uses a new path.
This issue is roughly the same when the "Show icons to the left of the filename" option is set to "All associated + EXE/LNK (slow)" or "All associated".
1. Build a program with a linked program icon resource A.
2. Use a different icon B and rebuild the program.
3. If the program path doesn't change, it still shows icon A in full view and (worse) the Alt+Enter dialog.
Windows explorer always reflects the icon update. And the icon will be properly shown in Total Commander if the program uses a new path.
This issue is roughly the same when the "Show icons to the left of the filename" option is set to "All associated + EXE/LNK (slow)" or "All associated".
#147523
Re: Updated program icon is not properly reflected
Probably due to Windows' icon cache:
Related topics:
viewtopic.php?t=77244
viewtopic.php?p=364898#p364898
viewtopic.php?p=383563#p383563
Related topics:
viewtopic.php?t=77244
viewtopic.php?p=364898#p364898
viewtopic.php?p=383563#p383563
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Updated program icon is not properly reflected
Thanks for your help! This is indeed the same problem. And Windows Explorer doesn't work better (I was wrong in the original post).
As other users may suggest, I think a command is desirable to "fully reload" resources, directly from the files, at any cost. Better than repeatedly restarting Total Commander. (Reopening Windows Explorer feels more acceptable, because it's much less useful, often annoying to see, and thus cheaper.)
As other users may suggest, I think a command is desirable to "fully reload" resources, directly from the files, at any cost. Better than repeatedly restarting Total Commander. (Reopening Windows Explorer feels more acceptable, because it's much less useful, often annoying to see, and thus cheaper.)
#147523
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Updated program icon is not properly reflected
Unfortunately there is no such command - the only thing that helps is restarting Total Commander, which can be done with a tool like Tinny TC Restarter:
http://totalcmd.net/plugring/tinnytcrestarter.html
It works even with TC 64-bit with a button command like this:
"C:\path to\TinnyTCRestarter\TinnyTCRestarter.exe" 1000 "c:\path to Total Commander\totalcmd64.exe"
http://totalcmd.net/plugring/tinnytcrestarter.html
It works even with TC 64-bit with a button command like this:
"C:\path to\TinnyTCRestarter\TinnyTCRestarter.exe" 1000 "c:\path to Total Commander\totalcmd64.exe"
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Updated program icon is not properly reflected
No need for third party tools - for restart of TC I use this in my usercmd.ini:
And then a button in the button bar with the em_restartcommander command.
These command open/reopen TC in the same dirs as it was in, and with the cursor on the same items - even if Save Directories on exit is not enabled in TC's Operation options.
you can also use:
but this one alters the instance number in TC's Title when used in em_restartcommander
Code: Select all
[em_newcommander]
cmd=%COMSPEC% /C
param=%Z%X start "" "%%COMMANDER_EXE%%" /N /P /A /i="%%COMMANDER_INI%%" %P%N* %T%M*
menu=Open new instance of Total Commander
button=%COMMANDER_EXE%
[em_restartcommander]
cmd=em_newcommander, cm_Exit
menu=Restart Total Commander
button=%COMMANDER_EXE%
These command open/reopen TC in the same dirs as it was in, and with the cursor on the same items - even if Save Directories on exit is not enabled in TC's Operation options.
you can also use:
Code: Select all
[em_newcommander]
cmd=%COMMANDER_EXE% /N /P /A /i="%COMMANDER_INI%"
param=%Z%X %P%N* %T%M*
menu=Open new instance of Total Commander
button=%COMMANDER_EXE%
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Updated program icon is not properly reflected
Thanks for the detailed reply! I like your way better.
To avoid the ephemeral console window, I write a tiny GUI program that launches Total Commander maximized (as my preference). My configuration looks like:
To avoid the ephemeral console window, I write a tiny GUI program that launches Total Commander maximized (as my preference). My configuration looks like:
Code: Select all
[em_NewCommander]
cmd=runmax.exe "%COMMANDER_EXE%"
menu=Open new instance of Total Commander
button=%COMMANDER_EXE%
[em_RestartCommander]
cmd=em_NewCommander, cm_Exit
menu=Restart Total Commander
button=%COMMANDER_EXE%
#147523
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Updated program icon is not properly reflected
The problem with this approach is that the new commander may start before the old one has had the opportunity to save its paths, tabs and other settings. That's why there is a delay of 1000 ms (one second) in tinnytcrestarter. On older PCs or when using slow virus scanners, 1 second may not be enough, so you may need to increase the value if the restarted TC doesn't get the previous paths and tabs.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Updated program icon is not properly reflected
2ghisler(Author)
My experience is that if I use:
using the command processor's "start" parameter, then there is no problem saving paths and tabs.
My experience is that if I use:
Code: Select all
[em_newcommander]
cmd=%COMSPEC% /C
param=%Z%X start "" "%%COMMANDER_EXE%%" /N /P /A /i="%%COMMANDER_INI%%" %P%N* %T%M*
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Updated program icon is not properly reflected
@ghisler Thanks for your advice! On my laptop I find it quick enough to save everything and use the original instance number (at least it appears so).
#147523