Tcmd 22.00.42 - annoying desktop refresh

May 20, 2008
11,410
99
Syracuse, NY, USA
Do you mean these?
Code:
REM v:\explorersettings.btm
echo ShowSysFiles = %@iniread[%_ininame,TakeCommand,ShowSysFiles]
echo ShowSuperHidden = %@iniread[%_ininame,TakeCommand,ShowSuperHidden]
echo ShowHiddenFiles = %@iniread[%_ininame,TakeCommand,ShowHiddenFiles]
echo ShowExtensions = %@iniread[%_ininame,TakeCommand,ShowExtensions]
Code:
v:\> v:\explorersettings.btm
ShowSysFiles = Yes
ShowSuperHidden = Yes
ShowHiddenFiles = Yes
ShowExtensions = Yes

Attached is a zipped EXE that will show the Explorer setttings.
Code:
v:\> p:\test\Release\test.exe
dwMask = 0x0004082b
SHOWSUPERHIDDEN = 1
DONTPRETTYPATH = 1
SHOWSYSFILES = 0
SHOWCOMPCOLOR = 1
SHOWEXTENSIONS = 1
SHOWALLOBJECTS = 1

Here's the code.
Code:
    SHELLSTATE ss;
    DWORD dwMask = SSF_SHOWSUPERHIDDEN | SSF_DONTPRETTYPATH | SSF_SHOWSYSFILES
                    | SSF_SHOWCOMPCOLOR | SSF_SHOWEXTENSIONS | SSF_SHOWALLOBJECTS;
    wprintf(L"dwMask = 0x%8.8X\n", dwMask);
    SHGetSetSettings(&ss, dwMask, FALSE);
    wprintf(L"SHOWSUPERHIDDEN = %d\nDONTPRETTYPATH = %d\nSHOWSYSFILES = %d\n"
            L"SHOWCOMPCOLOR = %d\nSHOWEXTENSIONS = %d\nSHOWALLOBJECTS = %d\n\n",
            ss.fShowSuperHidden    ? 1 : 0,    ss.fDontPrettyPath    ? 1 : 0,    ss.fShowSysFiles    ? 1 : 0,
            ss.fShowCompColor    ? 1 : 0,    ss.fShowExtensions    ? 1 : 0,    ss.fShowAllObjects    ? 1 : 0);

In spite of SHOWSYSFILES = 0, I see them in Explorer. This is a consequence of SHOWALLOBJECTS = 1. I commented on it more elaborately in another thread. Note that I have these:

1530418407362.png
 

Attachments

  • test.zip
    22.9 KB · Views: 91
May 18, 2018
31
2
Rex,
so, with all of the material presented above, is it too much to ask for you to look into the issue rather than respond with a glib "works for me"?

I will repeat that in my opinion, the most straightforward and rational way to resolve this is to provide an option to users to have TCmd just use existing Windows Explorer settings. Frankly, I find it hard to imagine anyone would have any interest in the current state of affairs of TCmd modifying Windows Explorer settings session-wide.
 
May 20, 2008
11,410
99
Syracuse, NY, USA
I still think the problem may be with the SSF_SHOWSYSFILES flag (ShowSysFiles option in TCC). If, in Explorer, I have "Show hidden files, folders, and drives" checked, I do see those things. I query the SHELLSTATE, I get
Code:
v:\> p:\test\Release\test.exe
dwMask = 0x0004082B
SHOWSUPERHIDDEN = 1
DONTPRETTYPATH = 1
SHOWSYSFILES = 0
SHOWCOMPCOLOR = 1
SHOWEXTENSIONS = 1
SHOWALLOBJECTS = 1

When I check, instead, "Don't show hidden files, folders, and drives", and "Apply", I no longer see those things, I get a refrersh, and afterwards I see
Code:
v:\> p:\test\Release\test.exe
dwMask = 0x0004082B
SHOWSUPERHIDDEN = 1
DONTPRETTYPATH = 1
SHOWSYSFILES = 1
SHOWCOMPCOLOR = 1
SHOWEXTENSIONS = 1
SHOWALLOBJECTS = 0
See that SHOWALLOBJECTS also changed (not by my request) and it seems to be the one that rules.
It is quite possible that TCMD would benefit from ignoring SSF_SHOWSYSFILES.
 

rconn

Administrator
Staff member
May 14, 2008
12,355
150
I'm 100% certain that your TCMD settings do not match your Explorer settings. I also have the advantage of knowing exactly what the code does -- which is to not call SHGetSetSettings if they match.

TCMD added those options because (hundreds of) users complained that they wanted their TCMD settings to be different from their default Explorer settings. (A lot of those are in corporate environments where the Explorer settings are locked down and they couldn't be changed.)

And I really don't think you would want TCMD to never change them, unless you never want to see extensions, hidden files, system files, or paths.
 

rconn

Administrator
Staff member
May 14, 2008
12,355
150
I added two new options in TCMD 23.0.20 (already uploaded).

The TCMD.EXE /E debugging startup option will pop up a messagebox for each mismatched Explorer / TCMD setting.

And there's a new TCMD.INI directive:

SetExplorerSettings=YES|no - If NO, Take Command will ignore any Explorer configuration settings in TCMD (show extensions, hidden files, etc.). The File Explorer window will use the default Windows settings. (Note that this will probably make the File Explorer window in TCMD somewhat less useful.)
 
May 18, 2018
31
2
I just installed 23.0.20, set "SetExplorerSettings=No" in C:\ProgramData\JP Software\Take Command 23\TCMD.INI (first item in the [TakeCommand] section), and rebooted just for good measure. I still get the desktop refresh.

Using the /E startup option, no message boxes are generated.
 

rconn

Administrator
Staff member
May 14, 2008
12,355
150
Assuming you put the directive in the right section ([TakeCommand]), then it isn't TCMD calling SHGetSetSettings. You may have a third-party dll being injected into TCMD that's responsible for your refresh.

Did you do the /E before or after adding the directive to TCMD.INI? (If afterwards, you would not see the messageboxes because TCMD will never execute that block of code.)
 
May 20, 2008
11,410
99
Syracuse, NY, USA
I'm lost! In Explorer, I have
1530465880446.png

and querying the SHELLSTATE structure gives this.
Code:
v:\> p:\test\Release\test.exe
dwMask = 0x0004082B
SHOWSUPERHIDDEN = 1
DONTPRETTYPATH = 1
SHOWSYSFILES = 0   <=== looks odd but that's how it is!
SHOWCOMPCOLOR = 1
SHOWEXTENSIONS = 1
SHOWALLOBJECTS = 1
TCMD.INI has
Code:
ShowSysFiles = Yes
ShowSuperHidden = Yes
ShowHiddenFiles = Yes
ShowExtensions = Yes
That agrees with my Explorer settings, but not with what SHGetSetSettings reports.
Then I start TCMD v23 build 20 with the /E option. A message box tells me there's a ShowSysFiles mis-match. And WinDBG says TCMD tries, with the same mask, to change 1381 to 1b81 (as seen in WinDBG's "Memory" display).
Now querying the shell state (from TCC in TCMD) shows the same as it did before.
Code:
v:\> p:\test\Release\test.exe
dwMask = 0x0004082B
SHOWSUPERHIDDEN = 1
DONTPRETTYPATH = 1
SHOWSYSFILES = 0   <=== same, even though TCMD tried to change it
SHOWCOMPCOLOR = 1
SHOWEXTENSIONS = 1
SHOWALLOBJECTS = 1
I still think this whole thing is due to an peculiar and poorly documented relationship beween ShowSysFiles ands ShowAllObjects.
 
May 18, 2018
31
2
Assuming you put the directive in the right section ([TakeCommand]), then it isn't TCMD calling SHGetSetSettings. You may have a third-party dll being injected into TCMD that's responsible for your refresh.

That's quite possible, of course. How would I get rid of the refresh then? Let me pre-empt the ever-popular "it's not our fault, it's that other application/dll" here: This particular machine has a (very) large number of applications installed, and not a single one of those triggers a desktop refresh on startup. Acrobat, Microsoft Office, Gimp, Inkscape, Paint.NET, Maple, Matlab, VS Code, PowerShell, Atom, etc., etc., you name it: Not one of them causes this kind of behavior.

Did you do the /E before or after adding the directive to TCMD.INI? (If afterwards, you would not see the messageboxes because TCMD will never execute that block of code.)

I removed the directive, and started with the /E flag again; no popup windows. Desktop refresh still happens with 23.0.21.
 
May 20, 2008
11,410
99
Syracuse, NY, USA
I should add (I've said this before but not recently) that I don't see any refresh, regardless of how different TCMD's settings are from Explorer's, and in spite of having verified that SHGetSetSettings is (was) being called with bSet == TRUE. Such a refresh, as triggered by a setting change in Explorer, is very obvious. It has been months (maybe years) since I've actually seen it when TCMD starts or stops.
 
May 18, 2018
31
2
I see the desktop refresh on startup of TCmd v23 but not on exit. With v22, the refresh would occur both at startup and exit.
 

rconn

Administrator
Staff member
May 14, 2008
12,355
150
I see the desktop refresh on startup of TCmd v23 but not on exit. With v22, the refresh would occur both at startup and exit.

Do you have the file explorer window set to display when TCMD starts? If so, try either setting it to autohide or disable it in the TCMD View menu.

We may be talking about two different things here - there's a desktop refresh (which only happens when calling SHGetSetSettings), and an icon refresh that's being done by Windows when displaying the file explorer control.
 
May 18, 2018
31
2
It's possible that it's an icon refresh. But, I get that whether or not the file explorer window is displayed on startup. And, why is there an icon refresh in the first place? Again, no other application I have does that.

Edit: I take that back, Windows indeed seems to perform an icon refresh when Explorer controls are shown using the "Save as" dialogs. Oh well.
 
May 20, 2008
11,410
99
Syracuse, NY, USA
I have been talking about the kind of refresh in which currently visible Explorer things (desktop included) change spontaneously to match the behavior of a being-started TCMD. I haven't seen that in a long time (and I know of no other kind of refresh). This pic shows InstallList.txt in an Explorer window (left) that existed before starting TCMD (right) which is hiding extensions.

1530632448100.png


If I navigate away and back in Explorer, I won't see the extension. So Explorer has the changed behavior but does not automatically change anything already in view whan TCMD starts. (And that's fine with me.)

I wonder what DRempfer would see in such a situation. Do things visible before starting TCMD actually change?
 
Similar threads
Thread starter Title Forum Replies Date
MickeyF equivalent to TCSTART.btm for TCMD? Support 4
D Bug TCMD /X option Support 6
vefatica TCMD hides itself! Support 3
vefatica Tray min'd TCMD and ACTIVATE Support 6
C How to? starting TCC/TCMD v25 Support 2
CWBillow TCC and TCMD in Powershell Support 6
kb6ojs How to? "Specified Account Already Exists" error installing TCMD v27 Support 12
CWBillow TCMD Colors Support 8
Jay Sage Issues With TCMD File Explorer Support 0
C Last TCMD that supports win 7? Support 5
gentzel TCMD background color confusion Support 6
R Upgrade TCMD 19 to TCC 26 Support 1
Alpengreis Remaining TCMD background process (v26) ... Support 19
S Windows Server version not being detected correctly in TCMD 26RC2 Support 9
G TCMD crash when copy Support 3
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
Jay Sage TCMD Crashes with "tctoolbar /c /r file" Support 5
nikbackm TCMD 25 - Unregister older TCMD version Support 2
G Documentation on TCMD.INI Support 9
R New Clear Buffer in TCMD Home Menu Support 2
CWBillow Back up TCMD tabs Support 2
CWBillow Upgrade Windows 10's effect on TCMD and TCC Support 3
DrusTheAxe TCMD 24.02.49 x64 crashed due to DivideByZero :-( Support 4
A After update to 24.02.49, helpfile tcmd.chm hangs when opened Support 0
David McClelland TCMD 24 & Perl - perl thinks it's own executable is ...\TCMD24\TCC.EXE??? Support 3
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
vefatica What's TCMD's problem with ^e[0m? Support 13
CWBillow TCMD PowerShell Tab elevated Support 6
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
vefatica TCMD output invisible on Win10 Support 22
J Moving from TCC v22 to TCMD v24 issues Support 3
RChrismon How to? Copy TCMD.INI to New Version Support 7
rps TCMD OPTIONS dialog Support 2
rps TCMD Tabs priority option setting Support 0
D Can we fix the scaling for TCmd? Support 14
CWBillow TCMD Tab Defs Support 4
A How to? TCMD Configuration Dialog: 'Smooth Scrolling' Option missing? Support 1
A Fixed [23.0.22]: TCMD crashes shortly after start, TCC keeps running in background Support 6
A TCMD - Dir Command puts out blank lines? Support 16
P Symantec Endpoint Protection trapped TCMD.EXE and said it contained WS.Reputation.1 (Virus?) Support 3
Emilio III TCMD Tab titles on Insider Windows Support 2
kb6ojs Want to start TCMD v20 with every Windows 10 bootup Support 3
CWBillow Context menu extensions for TCC/TCMD v18? Support 1
vefatica Pasting into TCMD via right-click menu? Support 2
M Please explain TCMD's ANSI x3.64 support Support 4
CWBillow Powershell tab in TCMD? Support 2
D Custom ini-file is not read, by tcmd.exe cli Support 6

Similar threads