• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

TC rearranges my desktop!

Mar 9, 2010
11
0
#1
When I either open or close tcmd.exe on Windows 10 x64, the desktop flashes as if it’s being reloaded (this didn’t happen when I was running Windows 8.1). And on closing, the two desktop.ini icons are moved from their out-of-the-way locations at the lower right of the screen to the upper left, where they don’t belong.

This doesn’t happen with tcc.exe

Please fix this — it’s a pain in the xxx to have to move those two icons back every time I run Take Command!
 
Mar 9, 2010
11
0
#3
I haven’t installed any plugins, and I don’t know about TCEXIT. Since my previous post, it appears that I may have one or more problems with malware. I’ll see what happens after these problems are resolved.
 
#4
Same issue here (with a fresh, "out of the box" TCMD 20.0.17 on Win10 x64) .

This is caused by the tcmd.exe process changing the ShowSuperHidden registry key to 0 (zero) upon starting TCMD and changing it back to 1 afterwards.
Effectively this will hide your desktop.ini (remove it from the Desktop) and show it afterwards.
But as desktop.ini is no shortcut (it is the file itself), Explorer doesn't keep track of the original location on the desktop and thus will be placed in the first "free slot" on your desktop. That is what you (and I) see happening...

You can reproduce this without TCMD by changing the value of the registry key (HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden) and refresh (F5) the Desktop.

I have no solution/ workaround to fix this, other than hiding the SuperHidden files all the time (which I don't like).

Good luck fighting your malware!

P.S. If your actual Desktop shortcuts also "move", you might have a problem with windows.storage.dll. That can be fixed.
 
#5
Same issue here too. And the explanation from MarteenG about "ShowSuperHidden" is right, thank you, MaartenG!

EDIT: workaround: if you have "ShowSuperHidden=Yes" in your TCMD.INI set the Win Explorer to show those files too ...
EDIT2: workaround works for non-admin only ...
EDIT3:Unfortunately, since I have updated to Build 25 the Workaround does no more work ...
 
Last edited:

rconn

Administrator
Staff member
May 14, 2008
10,318
93
#6
TCMD saves your current Explorer settings when it starts, and it restores the saved settings when it exits.

So this is only going to be an issue when your Explorer settings inside TCMD are different from your default settings. If you want them to be different, there's not much I can do about what Windows will do when they change when TCMD starts & change back when TCMD exits..
 
#7
Same issue here too. And the explanation from MarteenG about "ShowSuperHidden" is right, thank you, MaartenG!

EDIT: workaround: if you have "ShowSuperHidden=Yes" in your TCMD.INI set the Win Explorer to show those files too ...
EDIT2: workaround works for non-admin only ...
Nice find! That's a nice workaround. Things are back to normal, again :-)
Thank you!!

ad EDIT2: Maybe stating the obvious: admin account will probably use a different TCMD.ini.
 
#8
TCMD saves your current Explorer settings when it starts, and it restores the saved settings when it exits.
....
If you want them to be different, there's not much I can do about what Windows will do when they change when TCMD starts & change back when TCMD exits..
That is like saying: TCMD removes a leg from the chair when it starts and puts it back on afterwards. There's not much what TCMD can do about what gravity will do to the chair in the meantime ....


TCMD is a guest application on the operating system and should not change system-wide settings where the operating system and other guest applications depend on. This is 2016; TCMD is not the only application running ...

So this is only going to be an issue when your Explorer settings inside TCMD are different from your default settings.
And they very likely are ...
Why on earth is TCMD blindly changing the Explorer settings instead of just following the sytem-wide user-settings? (even if there is a "reason", it's still bad practice).
That's beside the fact that everyone now has to to manage these settings in 2 different places.

Not reproducible here (and TCMD certainly doesn't have any code to do something like that).
I disagree.
 

rconn

Administrator
Staff member
May 14, 2008
10,318
93
#9
Why on earth is TCMD blindly changing the Explorer settings instead of just following the sytem-wide user-settings? (even if there is a "reason", it's still bad practice).
TCMD is changing the system settings (*only* if you asked it to!) because that's what was requested by the users (years ago). Users wanted the option of having different options in the Explorer window in TCMD than the default settings in Windows. If you want it to behave the same, set the same options in both.
 
#10
First of all: there is no TCMD interface for changing the SuperHidden properties (that I coulsd find).

Second: these settings are activated (very!) implicit. No need to set them manually (I certainly didn't ask for it ! )
Example:
Menubar > Options > Registration Tab > Exit is enough to put the SuperHidden entry in TCMD.ini (among a lot of other new settings)


ShowSuperHidden.JPG

It would be explicit if there was a checkbox to overrule the current Explorer settings. And if that was checked the other options would be available to check.

Furthermore, I would expect these settings to be contained in the TCMD application (i.e. the TCMD File Explorer) instead of being set on a global level..
 
May 26, 2008
487
4
#13
Weird, my desktop now flashes when I start or exit TCMD once I upgraded to build 25.

I have both TCMD and Explorer set the same way: show extensions, hide hidden files, hide system files, etc.
 
May 26, 2008
487
4
#14
I used ProcMon to find out which Registry value TCMD was changing... it's "DontPrettyPath"

I'm not familiar with this setting. It's "0" when TCMD is not running and "1" when TCMD starts.
 
#15
Show File and Folder Names Using the Correct Case (Windows 95/98/Me/2000/XP) Popular

Some versions of Windows will attempt to adjust the capitalization of files and folders that are in all uppercase to make them more visually pleasing. For example, if you create a folder named "C:\ALLINCAPS" Windows will actually display it as "C:\Allincaps". This feature can be disabled using this tweak.
 
May 26, 2008
487
4
#17
Tried a different approach. I closed TCMD and set DontPrettyPath in the Registry to "1". Then logged off and logged back on.

Now when I start TCMD, all the values in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" are the same.... but TCMD *still* causes the desktop to flash, but only on startup. It doesn't flash on close any more.

I checked ProcMon again and see that TCMD is reading all those registry values, but it still writes them all (even though none of them changed). And then it causes Explorer to refresh.

Very annoying. This didn't happen until I upgraded to build 25. I was on build 21 before, IIRC.


BTW, I am not sure that Windows 10 even obeys this "DontPrettyPath" option. I have some folders in ALL CAPS and they show that way regardless of this DontPrettyPath setting.
 

rconn

Administrator
Staff member
May 14, 2008
10,318
93
#18
I used ProcMon to find out which Registry value TCMD was changing... it's "DontPrettyPath"

I'm not familiar with this setting. It's "0" when TCMD is not running and "1" when TCMD starts.
IMO it would be exceptionally bad form for a command processor to randomly change the case of filenames (not to mention completely breaking things like ClearCase that are case sensitive). So TCMD sets DontPrettyPath at startup & resets it to its previous value at exit.
 
#20
IMO it would be exceptionally bad form for a command processor to randomly change the case of filenames (not to mention completely breaking things like ClearCase that are case sensitive). So TCMD sets DontPrettyPath at startup & resets it to its previous value at exit.
I don't think anyone has asked that the command processor (TCC) do any case changing. Doesn't DontPrettyPath only affect how Explorer (and TCMD's File Explorer) displays file names? I don't understand what it has to do with ClearCase. What bad things happen if it's 0 and TCMD leaves it set to 0?
 

rconn

Administrator
Staff member
May 14, 2008
10,318
93
#21
I don't think anyone has asked that the command processor (TCC) do any case changing. Doesn't DontPrettyPath only affect how Explorer (and TCMD's File Explorer) displays file names? I don't understand what it has to do with ClearCase. What bad things happen if it's 0 and TCMD leaves it set to 0?
Just off the top of my head, you won't be able to drag & drop from Explorer to the command line, use any of the variables / functions that reference the Explorer window (like selected files), or use the right-click context menu to rename. Probably a few more, but those seem bad enough.
 
May 26, 2008
487
4
#23
I don't think anyone has asked that the command processor (TCC) do any case changing.
Yep exactly. I don't use the Explorer panes at all in TCMD. And if I drag/drop a folder/file to the TCC window, it doesn't matter if the case is different as the filesystem is case insensitive anyway.

Even so, why is TCMD *still* doing a full Explorer refresh when I set DontPrettyPath = 1. At that point all Explorer file view options are the same, yet build 25 still insists on doing the full refresh on startup.
 
#24
Just off the top of my head, you won't be able to drag & drop from Explorer to the command line, use any of the variables / functions that reference the Explorer window (like selected files), or use the right-click context menu to rename. Probably a few more, but those seem bad enough.
Why not? AFAIK, it only affects case, and the file system is case-insensitive. And every mention of DontPrettyPath I could find said that a logoff/logon was needed to effect it. If that's true, then TCMD's changing it would accomplish nothing (and a forcibly-killed or crashed TCMD could leave it changed to something the user didn't want).

All that said, I set it to 0, created a few files with bizarre combinations of upper and lower case in their names, logged off, logged on, and could see no difference whatsoever, anywhere. What must I do to see that setting actually have an effect?
 
May 26, 2008
487
4
#25
All that said, I set it to 0, created a few files with bizarre combinations of upper and lower case in their names, logged off, logged on, and could see no difference whatsoever, anywhere. What must I do to see that setting actually have an effect?
What version of Windows are you using? I see no effect on Windows 10.
 
May 26, 2008
487
4
#27
Ok this is interesting. I have every version of Windows in VMware Workstation so I tested this.

I could not see a difference in "DontPrettyPath" in Windows 10, 8.1, 7, Vista, XP, or 2000. It wasn't until I got to NT 4.0 where I saw the actually "prettying" effect where the case would be displayed differently in Explorer.
 
#28
Ok this is interesting. I have every version of Windows in VMware Workstation so I tested this.

I could not see a difference in "DontPrettyPath" in Windows 10, 8.1, 7, Vista, XP, or 2000. It wasn't until I got to NT 4.0 where I saw the actually "prettying" effect where the case would be displayed differently in Explorer.
Many Google hits for DontPrettyPath go back to the year 2000.

Rex mentioned a policy setting. I'm curious about that.
 
May 26, 2008
487
4
#29
Yeah I see from Google that the setting supposedly works in 2000 and XP, but I couldn't seem to get it to work. Folders shown in all caps continued to be shown in all caps in the Explorer views.

NT 4.0 was the latest Windows version that did what I expected with this setting. Changed an ALLCAPS folder to Allcaps.

On the Win 9x line, Windows Me also appears to ignore the setting like more modern versions of Windows. Windows 98 behaves like NT 4.0 though.
 
#30
Some remarks:

  • You don't need to reboot or logon/logoff to activate this setting.
    Just open Explorer (the filemanager, that is) and change some random, non-relevant Folder Option (Menu > Tools > Folder Options > View ) and click "OK". This will reload all the (registry) settings and refreshes Explorer (desktop + file manager).
    (Do this AFTER you started TCMD; otherwise the setting will be overruled again).
  • I have 2 seperate Explorer's running: one Desktop- explorer and a File manager-explorer. So to be very sure I also tested this by killing the Explorer File manager and restarting it. Same effect.
  • Also tested after removing the permissions to write to the relevant registry key (with DontPrettyPath=0) : makes no difference.
  • There is not such a thing as a GPO (or even local policy) to force the DontPrettyPath registry setting.
  • Filenames in Win32 are "case-retentive but not case-sensitive" : it matters how you write the (new) filename to disk (File.txt vs FILE.TXT vs file.txt), but it doesn't matter when reading or updating the same file.
  • I tested a few of the (worst-) cases as described by @rconn, but didn't notice any difference between with DontPrettyPath=0 or =1 (as expected)
  • DontPrettyPath is something from the past, like @Rod Savard already mentioned. It is not needed anymore (but even Microsoft forgot to remove the registry entry). A long time ago I experimented with it in WinXP; there it made no difference.
    You can change it anyway you want; it won't make any difference.
  • My guess is that the refresh is hardcoded in TCMD (and I would love to know how it's done; For some scripted deployment I need exactly that: a command-line tool to refresh Explorer Desktop+filemanager ..)
 
Top Bottom