| View previous topic :: View next topic |
| Author |
Message |
piranha Junior Member


Joined: 07 Feb 2003 Posts: 70 Location: Miami, Fl
|
Posted: Sun Feb 23, 2003 7:19 pm Post subject: Registry path to wincmd.ini |
|
|
Hi there,
On the old forum there was listing of registry keys and their search order
to obtain the location of tc installation dir and location of wincmd.ini.
Bad luck it does not exist anymore. Does anyone have copy of that information saved somewhere?
On my computer I have only
HKCU\Software\Ghisler\Total Commander InstallDir
value.
Best regards |
|
| Back to top |
|
 |
Aezay Senior Member


Joined: 12 Feb 2003 Posts: 247 Location: Denmark
|
Posted: Sun Feb 23, 2003 8:35 pm Post subject: |
|
|
Search in this order, the 1st key that exist should be used:
1. HKCU\Software\Ghisler\Total Commander
2. HKLM\Software\Ghisler\Total Commander
3. HKCU\Software\Ghisler\Windows Commander
4. HKLM\Software\Ghisler\Windows Commander
Under each key there should be three values:
1. "InstallDir" - Path where TC/WC is installed
2. "IniFileName" - Relative* path to the "WinCmd.ini"
3. "FtpIniName" - Relative* path to the "wcx_ftp.ini"
* - Relative to the dir where TotalCmd is installed: "InstallDir" _________________ Of all the planets I've been to, this one is my favorite.
Last edited by Aezay on Mon Feb 24, 2003 1:30 pm; edited 1 time in total |
|
| Back to top |
|
 |
piranha Junior Member


Joined: 07 Feb 2003 Posts: 70 Location: Miami, Fl
|
Posted: Sun Feb 23, 2003 8:39 pm Post subject: |
|
|
Thanks a lot for quick answer.
Is there info about name of TC executable?
Since this name change things get more complicated  |
|
| Back to top |
|
 |
Aezay Senior Member


Joined: 12 Feb 2003 Posts: 247 Location: Denmark
|
Posted: Sun Feb 23, 2003 8:43 pm Post subject: |
|
|
If "TOTALCMD.EXE" exist, use that one, else expect "WINCMD.EXE".
If that one doesn't exist either, something must be really wrong! _________________ Of all the planets I've been to, this one is my favorite. |
|
| Back to top |
|
 |
piranha Junior Member


Joined: 07 Feb 2003 Posts: 70 Location: Miami, Fl
|
Posted: Sun Feb 23, 2003 8:58 pm Post subject: |
|
|
| Aezay wrote: |
Under each key there should be three values:
1. "InstallDir" - Path where TC/WC is installed
2. "IniFileName" - Relative* path to the "WinCmd.ini"
3. "FtpIniName" - Relative* path to the "wcx_ftp.ini"
* - Relative to the dir where TotalCmd is installed: "InstallDir" |
sorry to bug you again, but for some reason I'm missing all those keys. (Well, I have "installdir" only)
You said inifilename and ftpininame are relative..
What in case if installdir = c:\program files\tc and your wincmd.ini is in c:\windows ?
IniFileName contains full path then?
I also know that WinCmd.ini and wcx_ftp.ini can be in 2 different places. Will the keys contain full path?
sorry to ask for all those details, I'm creating a small tool that will help plugin devs, therefore I have to have "all bases covered"  |
|
| Back to top |
|
 |
Aezay Senior Member


Joined: 12 Feb 2003 Posts: 247 Location: Denmark
|
Posted: Sun Feb 23, 2003 9:09 pm Post subject: |
|
|
piranha> sorry to bug you again, but for some reason I'm missing all those keys. (Well, I have "installdir" only)
I guess when "IniFileName" or "FtpIniName" is missing, you'll properly find them in %windir%, usually "C:\Windows".
piranha> What in case if installdir = c:\program files\tc and your wincmd.ini is in c:\windows ? IniFileName contains full path then?
I based my assumption on my reg settings. I have my ini files in the install dir, and my "IniFileName"=".\WinCmd.ini" and my "FtpIniName"=".\wcx_ftp.ini". Guess they aren't releative after all, but if the 1st two chars are ".\" you'll have to look in the "InstallDir". _________________ Of all the planets I've been to, this one is my favorite. |
|
| Back to top |
|
 |
Valentino Power Member


Joined: 06 Feb 2003 Posts: 665 Location: Ukraine
|
Posted: Mon Feb 24, 2003 4:10 am Post subject: |
|
|
| IniFileName and FtpIniName can be either absolute or relative. TC creates absolute paths. If you didn't specify INI files location during installation these registry keys can be missing. |
|
| Back to top |
|
 |
Hacker Moderator


Joined: 06 Feb 2003 Posts: 9108 Location: Bratislava, Slovakia
|
Posted: Mon Feb 24, 2003 12:58 pm Post subject: |
|
|
IniFileName can also be "wincmd.ini" in which case it is in the windows dir (as strange as it might sound).
HTH
Roman _________________ 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. |
|
| Back to top |
|
 |
piranha Junior Member


Joined: 07 Feb 2003 Posts: 70 Location: Miami, Fl
|
Posted: Mon Feb 24, 2003 1:12 pm Post subject: |
|
|
| Hacker wrote: | IniFileName can also be "wincmd.ini" in which case it is in the windows dir (as strange as it might sound).
HTH
Roman |
To sum it up...
I used following algorithm:
Check the registry in following order:
HKCU "Software\Ghisler\Total Commander" "IniFileName"
HKCU "Software\Ghisler\Total Commander" "IniFileName"
HKLM "Software\Ghisler\Total Commander" "IniFileName"
HKCU "Software\Ghisler\Windows Commander" "IniFileName"
HKLM "Software\Ghisler\Windows Commander" "IniFileName"
Then depending on value:
1. "wincmd.ini" or empty: we should use "$WINDIR\$0" (windows dir/valuename)
2. if two first chars are ".\": use "$INSTDIR\$1" (tc installdir\ value without .\)
3. If value begins with "%USERPROFILE%" - it's not clear to me.
This is pretty strange since this dir is nowhere defined within windows.
When I checked how inireloc tool worked, in this case it was putting the files to: "c:\Documents and Settings\robert\" and not even in "c:\Documents and Settings\robert\Local Settings\Application Data\" as recommended from M$. I guess we need authors clarification here. AFAIK nothing should be put in "c:\Documents and Settings\robert\"
In this case I simply display "unsupported" message.
4. Any other value use path from value |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Tue Feb 25, 2003 5:24 am Post subject: |
|
|
| Quote: | 3. If value begins with "%USERPROFILE%" - it's not clear to me.
This is pretty strange since this dir is nowhere defined within windows. |
Open a DOS box and send the command
set
This will show all environment variables. One of them is USERPROFILE. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
sqa_wizard Power Member


Joined: 06 Feb 2003 Posts: 2599 Location: Germany
|
Posted: Tue Feb 25, 2003 5:47 am Post subject: |
|
|
| piranha wrote: | | not even in "c:\Documents and Settings\robert\Local Settings\Application Data\" as recommended from M$ |
The path "c:\Documents and Settings\robert\" results of the environment variable USERPROFILE which is available at every OS of M$
The path "c:\Documents and Settings\robert\Local Settings\Application Data\" results of the environment variable APPDATA which is available for Win2k/XP only.
To have the full compatability USERPROFILE is chosen. _________________ #5767 Personal license |
|
| Back to top |
|
 |
piranha Junior Member


Joined: 07 Feb 2003 Posts: 70 Location: Miami, Fl
|
Posted: Tue Feb 25, 2003 8:21 am Post subject: |
|
|
| ghisler(Author) wrote: | | Quote: | 3. If value begins with "%USERPROFILE%" - it's not clear to me.
This is pretty strange since this dir is nowhere defined within windows. |
Open a DOS box and send the command
set
This will show all environment variables. One of them is USERPROFILE. |
Wow. And I spent like an hour digging thru registry. Didn't think about enviroment variable. shame me!  |
|
| Back to top |
|
 |
|