why does tc portable create always this empty folder? (AppData GHISLER)

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
giulia
Senior Member
Senior Member
Posts: 311
Joined: 2013-09-14, 05:33 UTC
Location: Europe

why does tc portable create always this empty folder? (AppData GHISLER)

Post by *giulia »

hi

can i ask why does tc portable create always this empty folder?
it does happen with registered and shareware not register

the folder is always created here

Code: Select all

C:\Users\Myname\AppData\Local\GHISLER
the point since it's portable it should not create empty folders , is there a tweak in the ini file to avoid it?
is it normal?
thanks
love Total Commander , best file manager ever made
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: why does tc portable create always this empty folder?

Post by *beb »

2giulia
It cannot be normal for the portable setup.
It would be easier to identify your issue if the %LocalAppData%\GHISLER weren't empty.
Still, there are some parameters in the ini related to the %LocalAppData% usage, e.g.:

Code: Select all

[Configuration]
DirUsageLocation=0
This one defines the location of the most frequently used directories list (tcDirFrq.txt).
Where 1 is default and stands for the %LocalAppData%\GHISLER
Set it to 0.

You can try my powershell tcmd_cli_setup_reporter_brief.ps1 script from there
https://ghisler.ch/board/viewtopic.php?t=81086
to quickly check if your setup is truly portable, or is leaving some traces in the system.
tcmd_cli_setup_reporter_brief.ps1

Code: Select all

$ghislerAppData  = @("$env:AppData\Ghisler","$env:LocalAppData\Ghisler")
$ghislerRegistry = [ordered]@{
"HKCU:\SOFTWARE\Ghisler"            ="HKCU:\SOFTWARE\GhislerBackup"
"HKLM:\SOFTWARE\Ghisler"            ="HKLM:\SOFTWARE\GhislerBackup"
"HKLM:\SOFTWARE\WOW6432Node\Ghisler"="HKLM:\SOFTWARE\WOW6432Node\GhislerBackup"}
$max             =   -($ghislerAppData+$ghislerRegistry|Measure -Maximum -Property Length).Maximum
# research AppData
Write-Host -f Cyan    '$AppData       : ' -no
Write-Host -f Yellow  'checking for resident data...'
$ghislerAppData|foreach {
if              (-not ($PSitem|Test-Path)) {
"{0,$max}" -f          $PSitem|Tee -var noData|Out-null
Write-Host -f DarkGray $noData -no;' : does not exist; no action required'
}
else {
# report AppData
"{0,$max}" -f          $PSitem|Tee -var Data|Out-null
Write-Host -f DarkRed  $Data -no
Write-Host -f Yellow  ' : contains data!'
$entry = Get-ChildItem $PSitem -recurse
foreach               ($item in $entry) {
"{0,$max}" -f          $item.FullName|Tee -var dataItem|Out-null
Write-Host -f DarkMag  $dataItem}
}}
# research Registry
Write-Host -f Cyan    '$Registry      : ' -no
Write-Host -f Yellow  'checking for resident data...'
foreach               ($key in $ghislerRegistry.keys) {
"{0,$max}" -f          $key|Tee -var keyOut|Out-null
if              (-not ($key|Test-Path)) {
Write-Host             $keyOut -f DarkGray -no;' : does not exist; no action required'}
else {
Write-Host             $keyOut -f Red -no
Write-Host  -f Yellow ' : contains data!'
Get-ChildItem          $key -recurse |foreach {
$regItem             = $PSitem.toString()
$regItem             = $regItem -replace 'HKEY.*USER\\','HKCU:' -replace 'HKEY.*MACHINE\\','HKLM:'
$regValues           = @()
(Get-ItemProperty      $regItem).PSobject.Properties|Where Name -notin PSPath,PSProvider,PSDrive,PSParentPath|Select Name,Value|
foreach {
$keyName             = $_.name
$keyValue            = $_.value
if   (                 $keyName -eq 'PSChildName') {
$subKey = $key + '\' + $keyValue}
else {
$regValues         += "{0,-11} = {1}" -f $keyName, $keyValue}
}
Write-Host -f Red      $subKey
$regValues|Sort-Object|foreach {
Write-Host -f Magenta  $_
}}}}

if (-not $MyInvocation.PSCommandPath) {pause}
If your setup is portable the script report would be as follows.
Image: https://i.imgur.com/cLSrS0o.png
Otherwise, the painting would be more colorful.
Last edited by beb on 2024-02-24, 21:49 UTC, edited 1 time in total.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: why does tc portable create always this empty folder?

Post by *Fla$her »

2giulia
cm_ThumbnailsConfig > Database Location (leave empty to disable caching):
cm_HistoryConfig > Storage location for list of most frequently used folders:
Overquoting is evil! 👎
giulia
Senior Member
Senior Member
Posts: 311
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: why does tc portable create always this empty folder?

Post by *giulia »

beb wrote: 2024-02-24, 21:27 UTC 2giulia
It cannot be normal for the portable setup.
It would be easier to identify your issue if the %LocalAppData%\GHISLER weren't empty.
Still, there are some parameters in the ini related to the %LocalAppData% usage, e.g.:

Code: Select all

[Configuration]
DirUsageLocation=0
This one defines the location of the most frequently used directories list (tcDirFrq.txt).
Where 1 is default and stands for the %LocalAppData%\GHISLER
Set it to 0.

You can try my powershell tcmd_cli_setup_reporter_brief.ps1 script from there
https://ghisler.ch/board/viewtopic.php?t=81086
to quickly check if your setup is truly portable, or is leaving some traces in the system.
tcmd_cli_setup_reporter_brief.ps1

Code: Select all

$ghislerAppData  = @("$env:AppData\Ghisler","$env:LocalAppData\Ghisler")
$ghislerRegistry = [ordered]@{
"HKCU:\SOFTWARE\Ghisler"            ="HKCU:\SOFTWARE\GhislerBackup"
"HKLM:\SOFTWARE\Ghisler"            ="HKLM:\SOFTWARE\GhislerBackup"
"HKLM:\SOFTWARE\WOW6432Node\Ghisler"="HKLM:\SOFTWARE\WOW6432Node\GhislerBackup"}
$max             =   -($ghislerAppData+$ghislerRegistry|Measure -Maximum -Property Length).Maximum
# research AppData
Write-Host -f Cyan    '$AppData       : ' -no
Write-Host -f Yellow  'checking for resident data...'
$ghislerAppData|foreach {
if              (-not ($PSitem|Test-Path)) {
"{0,$max}" -f          $PSitem|Tee -var noData|Out-null
Write-Host -f DarkGray $noData -no;' : does not exist; no action required'
}
else {
# report AppData
"{0,$max}" -f          $PSitem|Tee -var Data|Out-null
Write-Host -f DarkRed  $Data -no
Write-Host -f Yellow  ' : contains data!'
$entry = Get-ChildItem $PSitem -recurse
foreach               ($item in $entry) {
"{0,$max}" -f          $item.FullName|Tee -var dataItem|Out-null
Write-Host -f DarkMag  $dataItem}
}}
# research Registry
Write-Host -f Cyan    '$Registry      : ' -no
Write-Host -f Yellow  'checking for resident data...'
foreach               ($key in $ghislerRegistry.keys) {
"{0,$max}" -f          $key|Tee -var keyOut|Out-null
if              (-not ($key|Test-Path)) {
Write-Host             $keyOut -f DarkGray -no;' : does not exist; no action required'}
else {
Write-Host             $keyOut -f Red -no
Write-Host  -f Yellow ' : contains data!'
Get-ChildItem          $key -recurse |foreach {
$regItem             = $PSitem.toString()
$regItem             = $regItem -replace 'HKEY.*USER\\','HKCU:' -replace 'HKEY.*MACHINE\\','HKLM:'
$regValues           = @()
(Get-ItemProperty      $regItem).PSobject.Properties|Where Name -notin PSPath,PSProvider,PSDrive,PSParentPath|Select Name,Value|
foreach {
$keyName             = $_.name
$keyValue            = $_.value
if   (                 $keyName -eq 'PSChildName') {
$subKey = $key + '\' + $keyValue}
else {
$regValues         += "{0,-11} = {1}" -f $keyName, $keyValue}
}
Write-Host -f Red      $subKey
$regValues|Sort-Object|foreach {
Write-Host -f Magenta  $_
}}}}

if (-not $MyInvocation.PSCommandPath) {pause}
If your setup is portable the script report would be as follows.
Image: https://i.imgur.com/cLSrS0o.png
Otherwise, the painting would be more colorful.
Hi
well it was enough to add this
DirUsageLocation=0
to avoid the creation of the empty folder , so thank a lot!
but the script does not work
the error is in red ,but sadly not in english since my operation system it's not in english
i have run under w7 64bit sp1 with the updated
and the error is
failed to load tcmd_cli_setup_reporter_brief.ps1 file

Script execution is disabled on the current system. for more information, see "get-help about_signing".
the screenshot Image: https://i.imgur.com/lZwXc2o.jpeg
love Total Commander , best file manager ever made
giulia
Senior Member
Senior Member
Posts: 311
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: why does tc portable create always this empty folder?

Post by *giulia »

Fla$her wrote: 2024-02-24, 21:41 UTC 2giulia
cm_ThumbnailsConfig > Database Location (leave empty to disable caching):
cm_HistoryConfig > Storage location for list of most frequently used folders:
hi
i haven't cm_ThumbnailsConfig and cm_HistoryConfig in the ini file ,where are they?
thanks
love Total Commander , best file manager ever made
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: why does tc portable create always this empty folder?

Post by *beb »

giulia wrote: 2024-02-25, 06:52 UTC i haven't cm_ThumbnailsConfig and cm_HistoryConfig in the ini file,where are they?
2giulia
They are not in the ini.
They are the internal commands those implied to be executed by the user somehow.
For instance, you can create buttons on your toolbar with those commands.
The simplest way is just to type (or copy/paste) them cm_ThumbnailsConfig, and cm_HistoryConfig (one by one) in the Total Commander command line field and run them (one by one) from there.
Those commands won't do any magic for you, they just open respective configuration windows otherwise accessible via GUI:
cm_ThumbnailsConfig command = GUI menu Configuration - Option - Thumbnails
cm_HistoryConfig command = GUI menu Configuration - Option - History
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: why does tc portable create always this empty folder?

Post by *beb »

giulia wrote: 2024-02-25, 06:50 UTC but the script does not work...
i have run under w7 64bit sp1 with the updated
and the error is...
Image: https://i.imgur.com/lZwXc2o.jpeg
The script in question has been tested on Windows PowerShell 5.1 and cross-platform PowerShell 7.4+ (with the corresponding info in the original topic) while Windows 7 has an integral PowerShell 2.0 (an update to 5.1 was possible but required special moves). Sorry.
Last edited by beb on 2024-02-25, 08:51 UTC, edited 1 time in total.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
giulia
Senior Member
Senior Member
Posts: 311
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: why does tc portable create always this empty folder?

Post by *giulia »

beb wrote: 2024-02-25, 07:44 UTC
giulia wrote: 2024-02-25, 06:50 UTC but the script does not work...
i have run under w7 64bit sp1 with the updated
and the error is...
Image: https://i.imgur.com/lZwXc2o.jpeg
The script in question is tested on Windows PowerShell 5.1 and cross-platform PowerShell 7.4+ (with the corresponding info in the original topic) while Windows 7 has an integral PowerShell 2.0 (an update to 5.1 was possible but required special moves). Sorry.
Hi Beb
ok i will try on w11 and w10
the script should search for registry keys Ghisler , folders Ghisler and the ini files in the C: and some temp files , right?
by the way great script really
about to make a full portable version i should set these settings in the ini file , to be sure tc will be full portable
[Configuration]
UseIniInProgramDir=7
StartupScreen=0
UseNewDefFont=1
DirUsageLocation=0
UseRightButton=0
FirstTime=0
FirstTimeIconLib=0

thanks Beb
love Total Commander , best file manager ever made
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: why does tc portable create always this empty folder?

Post by *beb »

giulia wrote: 2024-02-25, 07:51 UTC ...to make a full portable version i should set these settings in the ini file, to be sure tc will be full portable...
It's not straightforward like that.
The parameter roles can be differentiated a bit:
- parameters for the portability:

Code: Select all

UseIniInProgramDir=7
DirUsageLocation=0
- parameters for the convenience:

Code: Select all

UseRightButton=0
StartupScreen=0
- parameters to avoid lame questions upon the very first start (for the freshly installed program):

Code: Select all

FirstTime=0
FirstTimeIconLib=0
The parameters list is customizable and is not full.
I very much welcome fellow users to share their ideas about what is a must to be there.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
giulia
Senior Member
Senior Member
Posts: 311
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: why does tc portable create always this empty folder?

Post by *giulia »

beb wrote: 2024-02-25, 08:45 UTC
giulia wrote: 2024-02-25, 07:51 UTC ...to make a full portable version i should set these settings in the ini file, to be sure tc will be full portable...
It's not straightforward like that.
The parameter roles can be differentiated a bit:
- parameters for the portability:

Code: Select all

UseIniInProgramDir=7
DirUsageLocation=0
- parameters for the convenience:

Code: Select all

UseRightButton=0
StartupScreen=0
- parameters to avoid lame questions upon the very first start (for the freshly installed program):

Code: Select all

FirstTime=0
FirstTimeIconLib=0
The parameters list is customizable and is not full.
I very much welcome fellow users to share their ideas about what is a must to be there.
Hi
but I would like to be added in the installer
do you think you scrit could work with cmd or only with PowerShell?
thanks
love Total Commander , best file manager ever made
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: why does tc portable create always this empty folder?

Post by *Fla$her »

beb wrote: 2024-02-25, 07:19 UTC Those commands won't do any magic for you
And why is there any magic needed here at all? GUI settings are the best choice for the user because they take effect as soon as they are applied.
Overquoting is evil! 👎
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: why does tc portable create always this empty folder?

Post by *beb »

giulia wrote: 2024-02-25, 14:05 UTC ...do you think you scrit could work with cmd or only with PowerShell?...
2giulia
Surely, a similar script could be made in cmd syntax (with a bit different logic here and there though), but I am just not interested in doing it. Sorry.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
MaxX
Power Member
Power Member
Posts: 1029
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: why does tc portable create always this empty folder?

Post by *MaxX »

That folder is not alone. Take a look inside both AppData folders:
C:\Users\%username%\AppData\Local\GHISLER\
C:\Users\%username%\AppData\Roaming\GHISLER\
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: why does tc portable create always this empty folder?

Post by *beb »

MaxX wrote: 2024-02-28, 03:37 UTC C:\Users\%username%\AppData\Local\GHISLER\
C:\Users\%username%\AppData\Roaming\GHISLER\
Just for the record:
-ProgramData folder contains any global application data that is not user-specific and is available to all users on the computer.
-AppData folder contains user-specific preferences and profile configurations and is further divided into three subfolders:
--Roaming folder that contains data that can move with the user profile from a computer to a computer.
--Local folder that contains data that is specific to a PC and cannot move with the user profile.
--LocalLow folder that contains low-level access data that cannot move (e.g. temporary files of the user's browser when running in a protected mode).

Most of the time (and it is by design and by default) AppData\Roaming and AppData\Local reside within the user profile location (%UserProfile%).
In its turn, most of the time (and it is by design and by default) the user profile location (%UserProfile%) is C:\Users\%UserName%.
But this is not the case all the time and therefore AppData\Roaming and AppData\Local locations have their dedicated variables %AppData% and %LocalAppData%.

So, although this is possible (and true most of the time):
C:\Users\%UserName%\AppData\Local\GHISLER\ = %UserProfile%\AppData\Local\GHISLER\ = %LocalAppData%\GHISLER\
C:\Users\%UserName%\AppData\Roaming\GHISLER\ = %UserProfile%\AppData\Roaming\GHISLER\ = %AppData%\GHISLER\

Still, the correct way to refer to those locations (using %variables% syntax) is:
%LocalAppData%\GHISLER\
%AppData%\GHISLER\
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: why does tc portable create always this empty folder?

Post by *JOUBE »

MaxX wrote: 2024-02-28, 03:37 UTC C:\Users\%username%\AppData\Local\GHISLER\
To avoid this but use the functionallity of tcDirFrq.txt, set your own location by using something like this DirUsageLocation=%COMMANDER_INI%\..\Temp\DirFrq\ or whatever... *)

Joube

*) %COMMANDER_INI_PATH%\ instead of %COMMANDER_INI%\..\ (from TC11.03)
Post Reply