Ini files in wrong directory (because of Polish letter?)
Moderators: Hacker, petermad, Stefan2, white
Ini files in wrong directory (because of Polish letter?)
I experienced problem with recognizing user profile directory by Total Commander 9.50. Didn't check earlier version - fresh installation. Windows 10 Pro EN-US), local user name Paweł (with Polish letter ł at the end). During installation, user profile is recognized as Pawel, with l at the end.
After installation, program is unable to write to config files, located in wrong directory. when I will start with admin rights new folder Pawel in C:\Users directory is created.
I tried with English and Polish language in tcmdr, the same.
After installation, program is unable to write to config files, located in wrong directory. when I will start with admin rights new folder Pawel in C:\Users directory is created.
I tried with English and Polish language in tcmdr, the same.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Ini files in wrong directory (because of Polish letter?)
This only works when setting the user locale to Poland for non-Unicode programs. Otherwise the ł isn't part of the codepage and cannot be used in ANSI INI file functions. This cannot be fixed on my side.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Ini files in wrong directory (because of Polish letter?)
ghisler(Author),
I think TC should only use Unicode API for any file operations, including accessing INI files. You can always convert Unicode string to an ANSI one after reading if needed.
I think TC should only use Unicode API for any file operations, including accessing INI files. You can always convert Unicode string to an ANSI one after reading if needed.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Ini files in wrong directory (because of Polish letter?)
The problem is that bad things happen when you access an ANSI INI file with Unicode API. One solution would be to convert the INI file to Unicode when it is found in a Unicode-only folder. This would lose compatibility with Windows 9x/ME.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Ini files in wrong directory (because of Polish letter?)
Shouldn't GetPrivateProfileStringW+WideCharToMultiByte(CP_ACP) produce the same output as GetPrivateProfileStringA? What kind of bad things may happen?
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Ini files in wrong directory (because of Polish letter?)
I have no enabled the option myself, and I had no problems reading the INI file even from a direcory with Polish characters. However, I didn't create a profile with Polish letters yet - I just set the ini location with various methods:
1. Started Total commander with parameter /i=c:\test\äöüł\wincmd.ini
2. In registry key HKEY_CURRENT_USER\Software\Ghisler\Total Commander set the value
iniFileName to c:\test\äöüł\wincmd.ini
3. In registry key HKEY_CURRENT_USER\Software\Ghisler\Total Commander set the value
iniFileName to %tcdirectory%wincmd.ini
and set environment variable
%tcdirectory% to c:\test\äöüł\
I tried with both ANSI and Unicode wincmd.ini, it both worked fine!
Could you please check how the location of your wincmd.ini is defined?
1. Started Total commander with parameter /i=c:\test\äöüł\wincmd.ini
2. In registry key HKEY_CURRENT_USER\Software\Ghisler\Total Commander set the value
iniFileName to c:\test\äöüł\wincmd.ini
3. In registry key HKEY_CURRENT_USER\Software\Ghisler\Total Commander set the value
iniFileName to %tcdirectory%wincmd.ini
and set environment variable
%tcdirectory% to c:\test\äöüł\
I tried with both ANSI and Unicode wincmd.ini, it both worked fine!
Could you please check how the location of your wincmd.ini is defined?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Ini files in wrong directory (because of Polish letter?)
2Mooschka
Have you installed Polish language pack for Windows?
Have you installed Polish language pack for Windows?
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Ini files in wrong directory (because of Polish letter?)
No, I don't have.
Re: Ini files in wrong directory (because of Polish letter?)
So do it…
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Ini files in wrong directory (because of Polish letter?)
I don't have any Polish language pack installed, and it works just fine! So apparently something is configured wrong on Mooschka's PC.
2Mooschka
Could you please do the following:
1. Run regedit.exe
2. Go to HKEY_CURRENT_USER\Software\Ghisler\Total Commander
3. Let me know the value of "iniFileName" in the right panel (just copy and paste it here)
If the value contains a text between percent signs like %APPDATA%, do the following:
4. From menu "Commands", choose "Open command prompt window"
5. Type the following command and press ENTER:
echo %APPDATA%
Note: Please replace the text between percent signs with the one from step 3 above if it is different. %APPDATA% is the most used.
2Mooschka
Could you please do the following:
1. Run regedit.exe
2. Go to HKEY_CURRENT_USER\Software\Ghisler\Total Commander
3. Let me know the value of "iniFileName" in the right panel (just copy and paste it here)
If the value contains a text between percent signs like %APPDATA%, do the following:
4. From menu "Commands", choose "Open command prompt window"
5. Type the following command and press ENTER:
echo %APPDATA%
Note: Please replace the text between percent signs with the one from step 3 above if it is different. %APPDATA% is the most used.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Ini files in wrong directory (because of Polish letter?)
2Mooschka
Could you please answer my questions? I'm "hanging in the air" without additional information.
Could you please answer my questions? I'm "hanging in the air" without additional information.

Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Ini files in wrong directory (because of Polish letter?)
Hi! Sorry for delay. Finally I have installed Windows with adding Microsoft account and the local name is pawel now, so problem disappeared.
I have added new local account Paweł again and I tried to download and install Total Commander. After downloading and start setup I have a got an error: The setup information file was not found!
Screenshot: Image: https://i.imgur.com/krMjLhl.png
After moving install file to other folder installation has started as usual. Fe days ago I have installed from NAS drive.
Registry after installation:
I have added new local account Paweł again and I tried to download and install Total Commander. After downloading and start setup I have a got an error: The setup information file was not found!
Screenshot: Image: https://i.imgur.com/krMjLhl.png
After moving install file to other folder installation has started as usual. Fe days ago I have installed from NAS drive.
Registry after installation:
APPDATA value:[HKEY_LOCAL_MACHINE\SOFTWARE\Ghisler\Total Commander]
"IniFileName"="%APPDATA%\\GHISLER\\wincmd.ini"
"FtpIniName"="%APPDATA%\\GHISLER\\wcx_ftp.ini"
"InstallDir"="C:\\totalcmd"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Ghisler\Total Commander]
"IniFileName"="%APPDATA%\\GHISLER\\wincmd.ini"
"FtpIniName"="%APPDATA%\\GHISLER\\wcx_ftp.ini"
"InstallDir"="C:\\totalcmd"
C:\Users\Paweł\AppData\Roaming
Re: Ini files in wrong directory (because of Polish letter?)
No, this is not a solution. I don't want PL lang pack.
Re: Ini files in wrong directory (because of Polish letter?)
Other applications, like Notepad++, IrfanView or FileZilla, have created folders in AppData normally.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Ini files in wrong directory (because of Polish letter?)
So only the installer fails to run from a subdir of C:\Users\Paweł, but Total Commander then runs fine when the settings are under C:\Users\Paweł?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com