Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Tcmd 22.00.42 - annoying desktop refresh

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: 223
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.
 
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.
 
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.
 
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.)
 
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.
 
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.)
 
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.
 
Try it with 23.0.21 (already uploaded). I made a minor change for a difference in Windows behavior between Win 7 & Win 10.
It no longer calls SHGetSetSettings with bSet == TRUE.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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

Back
Top