How to prevent the portable version of TC 9.51 from creating folders and registry entries

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *misvin »

Scenario:
1. Create in Windows 10 21H1 (64-bit) a new folder C:\Program Files\Total Commander
2. Copy ..\tcmd951x64\INSTALL\TOTALCMD64.EXE file from the installation archive to C:\Program Files\Total Commander
3. Copy wincmd.ini (with UseIniInProgramDir=7) to C:\Program Files\Total Commander
4. Run TOTALCMD64.EXE

5. After the first launch, TC created:
5.1. C:\Users\xxxx\AppData\Local\GHISLER\ empty folder
5.2. New HKEY_CURRENT_USER\SOFTWARE\Ghisler\Total Commander folder in the Registry with AutoUpdateCheckDate key.

How to prevent TC (portable version) from writing data to the registry and creating files/folders in other (not in C:\Program Files\Total Commander) folders?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *ghisler(Author) »

1. Don't put TC under "Program Files", it's a read only dir, so TC will have to redirect some writes.
2. You probably have update notifications enabled in your wincmd.ini, this causes the AutoUpdateCheckDate key.
Check for line AutoUpdateCheck in wincmd.ini and remove it.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *petermad »

2ghisler(Author)
Why does TC make an AutoUpdateCheckDate Registry key, when that key is also saved in wincmd.ini?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *ghisler(Author) »

Why does TC make an AutoUpdateCheckDate Registry key, when that key is also saved in wincmd.ini?
I have checked my code - it only writes it to registry when writing it to wincmd.ini fails. Since the user has put wincmd.ini in write protected dir with UseIniInProgramDir=7, TC can't write to it.
Author of Total Commander
https://www.ghisler.com
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *misvin »

ghisler(Author) wrote: 2021-06-02, 18:46 UTC 1. Don't put TC under "Program Files", it's a read only dir, so TC will have to redirect some writes.
If I allow some users and/or user groups full access to the C:\Program Files\Total Commander folder and the wincmd.ini file, is that enough to prevent TC 9.51 (portable version) from creating other folders on disk and registry entries?
If so, please list all of the required users/groups and their security permissions for all objects (C:\Program Files\Total Commander folder and its subfolders and files).
Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *ghisler(Author) »

It should be sufficient to grant the user(s) write rights who are going to use Total Commander. This can be individual users, or the group "Users" for everyone - but this has security issues, see:
https://www.ghisler.ch/board/viewtopic.php?f=35&t=74520
Author of Total Commander
https://www.ghisler.com
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *misvin »

ghisler(Author) wrote: 2021-06-03, 15:20 UTC It should be sufficient to grant the user(s) write rights who are going to use Total Commander. This can be individual users, or the group "Users" for everyone
I granted myself Full Control permissions for both the C:\Program Files\Total Commander folder and the C:\Program Files\Total Commander\wincmd.ini file.
Now when I run C:\Program Files\Total Commander\TOTALCMD64.EXE, no registry entries are created, but C:\Users\xxxx\AppData\Local\GHISLER\ empty folder is still created.
How to fix it?

Notes:
1. To test this issue, the C:\Program Files\Total Commander folder includes only 3 files: TOTALCMD64.EXE; wincmd.ini; wincmd.key
2. The problem also exists, when I put these 3 files in the C:\Total Commander\ folder and run C:\Total Commander\TOTALCMD64.EXE.
Last edited by misvin on 2021-06-04, 00:34 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *petermad »

2ghisler(Author)
I have checked my code - it only writes it to registry when writing it to wincmd.ini fails
Interesting that this, not very crucial, wincmd.ini parameter is the only one that is written to the registry...
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *ghisler(Author) »

The GHISLER folder will still be created if
1. You use thumbnail view with default database location: %$LOCAL_APPDATA%\GHISLER
You can leave that field empty to not use a thumbnail database.
2. You use a .bar file from a write protected directory. TC will create .br2 files to cache the icons for the bar.
To prevent, create a subdirectory in the TC directory, and give yourself write rights to it. Then move the .bar files inside and choose the new location via Configuration - Button bar - ">>" button (same for Button bar 2).
Author of Total Commander
https://www.ghisler.com
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: How to prevent the portable version of TC 9.51 from creating folders and registry entries

Post by *misvin »

ghisler(Author) wrote: 2021-06-04, 09:15 UTC The GHISLER folder will still be created if
1. You use thumbnail view with default database location: %$LOCAL_APPDATA%\GHISLER
You can leave that field empty to not use a thumbnail database.
Thanks,
I added a new line ThumbsLocation= to wincmd.ini, and that fixed my issue.
Post Reply