[TC 11.50] WINCMD.KEY may be overwritten by itself if installing it by double-clicking

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5464
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC 11.50] WINCMD.KEY may be overwritten by itself if installing it by double-clicking

Post by *white »

  • Suppose you have installed Total Commander in "c:\Program Files" and you have your license file (WINCMD.KEY) in the folder %APPDATA%\GHISLER
  • Suppose that you now want to put your license file in the program folder to get it to work for all users. To do that you start TC (not in elevated mode), navigate to a WINCMD.KEY file, and double-click it.
  • Click Yes to install the license.
  • When the UAC elevation prompt appears, you accidentally don't allow elevation.
    Now the WINCMD.KEY is installed in %APPDATA%\GHISLER where it already is, causing the modification date of the file to change.
    In my opinion the file should be left unchanged in this situation.

By the way, when WINCMD.KEY is installed by double-clicking it, the new WINCMD.KEY file in the program folder or appdata folder gets a new modification timestamp. And when a WINCMD.KEY file already exists in the destination folder, the file is overwritten without warning. Both these things are, in my opinion, unwanted and do not happen when you copy the WINCMD.KEY file by hand to the appropriate folder.

It seems that by double-clicking the WINCMD.KEY file, the file is recreated in the destination folder rather than copied to the destination folder. I think it would be better if the file was copied using TC's normal copy function, causing the modification timestamp to remain unchanged and causing overwrite confirmation dialogs when a WINCMD.KEY file already exists in the destination folder.
JOUBE
Power Member
Power Member
Posts: 1626
Joined: 2004-07-08, 08:58 UTC

Re: [TC 11.50] WINCMD.KEY may be overwritten by itself if installing it by double-clicking

Post by *JOUBE »

I wouldn't change anything at this point. By addressing these and other unimportant and irrelevant questions in recent times, many new problems have been opened up, which then had to be laboriously corrected again.

Besides, who cares, TC users can deal with this kind of thing without any problem.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49881
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50] WINCMD.KEY may be overwritten by itself if installing it by double-clicking

Post by *ghisler(Author) »

Double clicking the key copies it to the program folder, and when this fails due to missing rights, to %APPDATA%\GHISLER. This is done independently of whether the file already exists or not.

Moderator message from: ghisler(Author) » 2025-01-07, 08:37 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5464
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.50] WINCMD.KEY may be overwritten by itself if installing it by double-clicking

Post by *white »

ghisler(Author) wrote: 2025-01-07, 08:37 UTC Double clicking the key copies it to the program folder, and when this fails due to missing rights, to %APPDATA%\GHISLER.
I know, sadly this is not transparent for the user at all, but this is not what my report is about. And it seems that the file is not copied, but rather the contents of the file is copied to a new file. This results in a new modification timestamp which normally does not happen when a file is copied. I remarked that this is unwanted because a changed modification timestamp suggests a change in the contents of the file. This may cause people to wonder if the file was changed when it was installed. Furthermore, the timestamp may be used to identify the key file when people have multiple key files. For example, I have multiple key files because my address changed a couple of times. Whenever I encounter a WINCMD.KEY file anywhere on my computer or in a backup, I can identify the key file by looking at the timestamp.
ghisler(Author) wrote: 2025-01-07, 08:37 UTC This is done independently of whether the file already exists or not.
Obviously, overwriting a license file without the user knowing which file, at which location, is problematic. There can be multiple license files at play in different locations (program folder and appdata folder), which could potentially lead to the loss of a license file.

But my report is about when the license file is copied to itself, which makes no sense and can easily be avoided. In the best case this only changes the timestamp. In the worst case the license file can become corrupted. In my opinion, TC should never try to copy the license file to itself.
Post Reply