(not bug) cannot read/write ini in Win7

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

(not bug) cannot read/write ini in Win7

Post by *Alextp »

New computer, Win7 RTM installed and TC 7.5 pack copied from flash

Written in registry location of ini (in the tc folder), but tc starts as no ini exists- with default settings. after attempt to change settings it shows msg
"Cannot write D:\My Program Files\Total Commander\wincmd.ini!"

so it starts with corrects ini but cannot read/write ini.
turning UAC off, running as admin, all doesn't help.
Last edited by Alextp on 2009-09-15, 10:32 UTC, edited 2 times in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50909
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Normal users aren't allowed to write under "Program files". Either install TC in d:\Totalcmd as suggested by the installer, or choose a different location for the ini files during installation, where you have write rights.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Also you may edit permissions for wincmd.ini and allow its writing for all users.
sEXEcutor
Junior Member
Junior Member
Posts: 10
Joined: 2009-09-14, 17:44 UTC

Post by *sEXEcutor »

Alextp reposted my problem from russian forum.
Normal users aren't allowed to write under "Program files"
D:\My Program Files is NOT %PROGRAMFILES% directory, I've created it.
Also you may edit permissions for wincmd.ini and allow its writing for all users.
It doesn't help.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

What's in the registry key: HKU\Software\Ghisler\
FtpIniName = %APPDATA%\¤TC\wcx_ftp.ini
IniFileName = %APPDATA%\¤TC\wincmd.ini
InstallDir = C:\Program Files\TotalCMD
No quotes around any KeyValues and REG_SZ's

And I edited that after the initial install to fix the "GHISLER" path, so I could get rid of the junction and put the ¤TC folder to the top of the Application Data. So you should be able to just edit the value(s) to:
D:\My Program Files\TotalCMD\wcx_ftp.ini
D:\My Program Files\TotalCMD\wincmd.ini
D:\My Program Files\TotalCMD
Or something similiar.
sEXEcutor
Junior Member
Junior Member
Posts: 10
Joined: 2009-09-14, 17:44 UTC

Post by *sEXEcutor »

2Balderstrom
Already done, TC shows right path in message "Cannot write D:\My Program Files\Total Commander\wincmd.ini!"

Yeah, before registry changes TC looked for wincmd.ini in %UserDir% and created there a new one, so it can't find (or read?) wincmd.ini in it's own directory.
This TC pack works ok on old computer with Windows 7 build 7127.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I would try changing the path, to see if it's some strange Win7 quirk with things named "Program Files"...

So put it in D:\Apps\TotalCMD\
update the registry as such, and see if there's still the write failure?
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

sEXEcutor wrote:Alextp reposted my problem from russian forum.
Normal users aren't allowed to write under "Program files"
D:\My Program Files is NOT %PROGRAMFILES% directory, I've created it.
Also you may edit permissions for wincmd.ini and allow its writing for all users.
It doesn't help.
It helps if TC folder is write-protected. I have TC folder write-protected for security reasons, just some ini-files has full permissions, and all work fine.

Do you have TC installed in D:\My Program Files\Total Commander? Check Help\About menu command, there TC shows current ini paths. Can you change and save changes in this files with Notepad for example?
sEXEcutor
Junior Member
Junior Member
Posts: 10
Joined: 2009-09-14, 17:44 UTC

Post by *sEXEcutor »

The answer was in Balderstrom's words:
No quotes around any KeyValues and REG_SZ's
After first start TC didn't get wincmd.ini and created a new one in %UserDir%. I'm a lazy man so I used an application named TCDir for changing paths in registry. TCDir changed them but WITH quotes. As I remember, this app worked good with old versions with TC, so I didn't check changes.
After correcting values all works ok.

Gentlemen, it's not a bug. Thanks to all!

PS Now I know about official tool inireloc.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to the English forum.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply