cannot wrtie user.ini
Moderators: Hacker, petermad, Stefan2, white
cannot wrtie user.ini
Hello! I use the "RedirectSection" to make the "[dirmenu]" to the file named user.ini for convenience. But everytime i add thing to hotlist using the "add to submenu" option, it will show error that cannot write user.ini, please remove the write protection. And the strange thing is that it had been add to the hotlist and user.ini. The same when i start with administrator privileges. The version is 11.03, Windows 10 22H2. The following is my settings, thx.
wincmd.ini
[DirMenu]
RedirectSection=%COMMANDER_PATH%\User\User.ini
User.ini
[DirMenu]
menu1=-Doc
menu2=usr
cmd2=cd c:\usr
menu3=--
Image: https://github.com/Daedemons/hello-world/blob/master/image.png
wincmd.ini
[DirMenu]
RedirectSection=%COMMANDER_PATH%\User\User.ini
User.ini
[DirMenu]
menu1=-Doc
menu2=usr
cmd2=cd c:\usr
menu3=--
Image: https://github.com/Daedemons/hello-world/blob/master/image.png
Re: cannot wrtie user.ini
Can you edit user.ini with other programs?
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: cannot wrtie user.ini
Yes, i can edit it with any editors include nodepad. Actually, it happens on my another computer. Can you please try to repeat my action in your computer? I don't know if this is a problem with my device, thx.
Re: cannot wrtie user.ini
2FForever
Please, make sure your wincmd.ini and redirected ini in question have a valid encoding.
Only two options are available (supported by Windows ini functions): ANSI and/or UTF-16LE with BOM (1200).
E.g., if your ini saved in UTF-8 (65001), resave it in UTF-16LE with BOM (1200).
Please, make sure your wincmd.ini and redirected ini in question have a valid encoding.
Only two options are available (supported by Windows ini functions): ANSI and/or UTF-16LE with BOM (1200).
E.g., if your ini saved in UTF-8 (65001), resave it in UTF-16LE with BOM (1200).
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cannot wrtie user.ini
If you have installed Total Commander under "Program Files", %COMMANDER_PATH% would point there too. All subfolders are write protected by default. You can press Alt+Enter on the file and grant yourself full access to the file if you want to modify it with normal user rights.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: cannot wrtie user.ini
The format of both files is UTF-16LE with BOM. As what i said, the redirected ini can be writed with correct imformation, and it will pop up an error dialog at the same time. After i close the dialog, i can find the redirected ini has been writed with correct imformation.beb wrote: 2024-07-26, 13:07 UTC 2FForever
Please, make sure your wincmd.ini and redirected ini in question have a valid encoding.
Only two options are available (supported by Windows ini functions): ANSI and/or UTF-16LE with BOM (1200).
E.g., if your ini saved in UTF-8 (65001), resave it in UTF-16LE with BOM (1200).
Re: cannot wrtie user.ini
I installed tc in portable mode, and i comfirm that i have enough right to edit this ini file, not read only. Even i start tc with administrator mode, it pop up the error dialog.ghisler(Author) wrote: 2024-07-26, 13:15 UTC If you have installed Total Commander under "Program Files", %COMMANDER_PATH% would point there too. All subfolders are write protected by default. You can press Alt+Enter on the file and grant yourself full access to the file if you want to modify it with normal user rights.
Re: cannot wrtie user.ini
Confirmed when using that encoding. Also without redirection. Also, when adding not to subfolder and then deleting it.
Re: cannot wrtie user.ini
It is caused by this change in TC 11.00rc2:
14.07.23 Fixed: Directory hotlist, add entry in submenu or delete entry: Write entire section [dirmenu] to store it in sorted order and much faster, warn if section too big (32/64)
Moderator message from: white » 2024-07-26, 14:08 UTC
Moved topic
» from Total Commander (English) to TC11.x bug reports (English)
» from Total Commander (English) to TC11.x bug reports (English)
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cannot wrtie user.ini
I cannot reproduce this. Here is what I tried:
1. Installed in C:\Program Files\Total Commander\ (write protected)
2. Added the following to wincmd.ini:
[DirMenu]
RedirectSection=%COMMANDER_PATH%\User\User.ini
3. Created directory User under the program directory (as administrator)
4. Tried to save directory to hotlist -> error as expected
5. Copied a file User.ini (encoded as UTF16LE) with some entries to User dir
6. Tried to save directory to hotlist -> still error as expected
7. Alt+Enter on User.ini, grant "User" full access to file
8. Tried to save directory to hotlist -> no more error, the file is saved
9. Deleted User.ini
10. Alt+Enter on directory "User", grant "User" full access to file
11. Copied a file User.ini (encoded as UTF16LE) with some entries to User dir
12. Tried to save directory to hotlist -> no more error, the file is saved
I tried this with wincmd.ini located under c:\users\... (writable) and also under c:\Program Files\... (not writable).
So at least here it works when the user has the right to either write to "User.ini" or to the directory "User".
What am I missing?
1. Installed in C:\Program Files\Total Commander\ (write protected)
2. Added the following to wincmd.ini:
[DirMenu]
RedirectSection=%COMMANDER_PATH%\User\User.ini
3. Created directory User under the program directory (as administrator)
4. Tried to save directory to hotlist -> error as expected
5. Copied a file User.ini (encoded as UTF16LE) with some entries to User dir
6. Tried to save directory to hotlist -> still error as expected
7. Alt+Enter on User.ini, grant "User" full access to file
8. Tried to save directory to hotlist -> no more error, the file is saved
9. Deleted User.ini
10. Alt+Enter on directory "User", grant "User" full access to file
11. Copied a file User.ini (encoded as UTF16LE) with some entries to User dir
12. Tried to save directory to hotlist -> no more error, the file is saved
I tried this with wincmd.ini located under c:\users\... (writable) and also under c:\Program Files\... (not writable).
So at least here it works when the user has the right to either write to "User.ini" or to the directory "User".
What am I missing?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: cannot wrtie user.ini
It's not about simply saving, but explicitly saving an entry to a subfolder in the directory hotlist. Or deleting an entry.ghisler(Author) wrote: 2024-07-31, 07:01 UTC ...
8. Tried to save directory to hotlist -> no more error, the file is saved
...
12. Tried to save directory to hotlist -> no more error, the file is saved
...
What am I missing?
It's about a specific error being displayed, the file is saved regardless of that. In what circumstance this error "-> <filename>" (starting with an ascii arrow) is displayed, should be easy to find in your code.
It is not specifically related to redirection. Simply unpack the TC installer to a folder, create a wincmd.ini with UTF-16 LE BOM encoding with contents
Code: Select all
[Configuration]
UseIniInProgramDir=7
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cannot wrtie user.ini
Thanks, I missed that. I can reproduce it now. In the branch dealing with the Unicode ini file there was a result:=true missing.saving an entry to a subfolder in the directory hotlist. Or deleting an entry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cannot wrtie user.ini
This should be fixed in Total Commander 11.50 beta 1, please check it!
01.08.24 Fixed: Ctrl+D directory menu: An error was shown when adding item to subfolder or removing item, but only when [dirmenu] section redirected to Unicode ini file (32/64)
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: cannot wrtie user.ini
As I said, it is not specifically related to redirection:ghisler(Author) wrote: 2024-10-09, 14:12 UTC This should be fixed in Total Commander 11.50 beta 1, please check it!01.08.24 Fixed: Ctrl+D directory menu: An error was shown when adding item to subfolder or removing item, but only when [dirmenu] section redirected to Unicode ini file (32/64)
So I think your bug fix description should read:white wrote: 2024-07-31, 07:34 UTC It is not specifically related to redirection. Simply unpack the TC installer to a folder, create a wincmd.ini with UTF-16 LE BOM encoding with contents
(Made it less broken English as well.)01.08.24 Fixed: Ctrl+D directory menu: An error was shown when adding an item to a subfolder or removing an item, but only when the [dirmenu] section was written to an ini file with Unicode encoding (UTF-16 LE BOM) (32/64)
Tested OK, but I did not test it with redirection.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: cannot wrtie user.ini
Thanks for confirming the fix! I will use your description for the history.
The original post was using RedirectSection to point to a Unicode ini file. I didn't test with a Unicode main ini file.As I said, it is not specifically related to redirection:
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com