wcx_ftp.ini in wrong location, Vista 64

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

wcx_ftp.ini in wrong location, Vista 64

Post by *robinsiebler »

I have the following entry in the registry:
Key: HKCU\Software\Ghisler\Total Commander\
Value: FtpIniName
Data: .\ini\wcx_ftp.ini
Value: IniFileName
Daata: .\ini\totalcmd.ini
Key: InstallDir
Data: c:\Program Files (x86)\totalcmd\

TC is installed in c:\Program Files (x86)\totalcmd. However, for some reason wcx_ftp.ini was created in c:\Program Files\totalcmd and TC is expecting the file to be there.

TC v7.50B6.
Last edited by robinsiebler on 2009-06-28, 17:22 UTC, edited 1 time in total.
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Robin.

Having the entry which you posted inside one's own HKCU registry hive is one thing. Yet, there are at minimum two ways of overwriting the configuration given in the registry:

(1) Commandline

The icon which you use in order to launch T.C. v7.50 pb6 might hold the following commandline e.g.:
"c:\Program Files (x86)\totalcmd\totalcmd.exe" /I="c:\Program Files\totalcmd\wincmd.ini" /F="c:\Program Files\totalcmd\wcx_ftp.ini"
(2) UseIniInProgramDir=7

There might be a wincmd.ini file inside the T.C. programme folder holding the entry UseIniInProgramDir=7 inside the [Configuration] section. This would make pretty sure that the file wcx_ftp.ini would be looked for in the same folder. In case it did not exist, it would be created there.
The icon commandline might still simply read
"c:\Program Files (x86)\totalcmd\totalcmd.exe"
The difference between "c:\Program Files (x86)\totalcmd" and "c:\Program Files\totalcmd" might be accounted for by the automatic folder redirection which 64bit Windows will perform for 32bit programmes.

Kind regards,
Karl
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

There is a key InstallDir in [Configuration]. What do you have in it?

It is better to pass full path to ini, i.e. "%COMMANDER_PATH%\ini\wcx_ftp.ini" instead of ".\ini\wcx_ftp.ini". Also, check your Working directory in the LNK properties. Because "." means not application folder but working folder.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, ".\" at the beginning is treated in a special way ONLY when handling ini files: It means the program directory. So even if InstallDir points to
c:\Program Files (x86)\totalcmd\ ,
this is ignored by TC for the ".\" location: TC will always look in the program directory of the running program with this option.

So if you have TC started from
c:\Program Files\totalcmd\

it will look for the ini file in
c:\Program Files\totalcmd\ini

with the above option.
Author of Total Commander
https://www.ghisler.com
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

1. I only have totalcmd.ini. There is no wincmd.ini
2. I always launch a shortcut that points to "c:\Program Files (x86)\totalcmd\TOTALCMD.EXE", with the same working dir and no command-line parameters.
3. I don't think you can put environment variables in the registry. I can't imagine they would expand properly.
4. I have the same format for both reg keys and TC has no problem finding totalcmd.ini.
5. InstallDir=%COMMANDER_PATH%.
6. There is no UseIniInProgramDir entry in totalcmd.ini
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Not default

Post by *Clo »

2robinsiebler

:) Hello !
…6. There is no UseIniInProgramDir entry in totalcmd.ini
• It isn't set by default, you ought add it by editing the file.
- Please, see HERE to get the values.

:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

robinsiebler wrote:1. I only have totalcmd.ini. There is no wincmd.ini
2. I always launch a shortcut that points to "c:\Program Files (x86)\totalcmd\TOTALCMD.EXE", with the same working dir and no command-line parameters.
3. I don't think you can put environment variables in the registry. I can't imagine they would expand properly.
4. I have the same format for both reg keys and TC has no problem finding totalcmd.ini.
5. InstallDir=%COMMANDER_PATH%.
6. There is no UseIniInProgramDir entry in totalcmd.ini
1. I think totalcmd.ini==wincmd.ini
3. In this case TC will expand this variable, so I think it will expand it.
5. I suggest to set InstallDir to correct full path.
6. As Clo said, UseIniInProgramDir isn't set by default. You may see description of all ini-parameters in TC help file.

Also, TC doesn't need any registry keys for operating. All settings Tc keeps in ini-files.
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

I set the variables in the ini file and now everything is happy. I'm not sure why it wasn't working to begin with - I've never changed any of the mentioned variables; I've always had the registry entries and everything just worked.
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, guys.

May I point out that the parameter InstallDir inside the registry is only evaluated by the Total Commander setup programme?! totalcmd.exe itself does not care about this registry value too much.
May I also point out that the parameter InstallDir inside the wincmd.ini is more or less completely irrelevant?! (I tend to assume that it may have been used in the pre-registry era of Windows, i.e. in the Windows 3.x era.)

Simply re-read what Christian has written.

Whatever the registry value InstallDir says, totalcmd.exe will determine its current %COMMANDER_PATH% and compose these INI filenames (based on Robin's initial post):

+ %COMMANDER_PATH%\ini\totalcmd.ini
+ %COMMANDER_PATH%\ini\wcx_ftp.ini

In order to find out what the current %COMMANDER_PATH% is, launch cmd.exe from inside the running T.C. Inside cmd.exe execute these commands:
echo %COMMANDER_PATH%
echo %COMMANDER_INI%


wcx_ftp.ini will have this value in Robin's case:
echo %COMMANDER_PATH%\ini\wcx_ftp.ini

Robin, could you be bothered perhaps to execute and post the screen output of these 3 commands, please. :)

HTH,
Karl
Post Reply