Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Registry path to wincmd.ini

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
piranha
Junior Member
Junior Member


Joined: 07 Feb 2003
Posts: 70
Location: Miami, Fl

PostPosted: Sun Feb 23, 2003 7:19 pm    Post subject: Registry path to wincmd.ini Reply with quote

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
View user's profile Send private message Visit poster's website
Aezay
Senior Member
Senior Member


Joined: 12 Feb 2003
Posts: 247
Location: Denmark

PostPosted: Sun Feb 23, 2003 8:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
piranha
Junior Member
Junior Member


Joined: 07 Feb 2003
Posts: 70
Location: Miami, Fl

PostPosted: Sun Feb 23, 2003 8:39 pm    Post subject: Reply with quote

Thanks a lot for quick answer.
Is there info about name of TC executable?
Since this name change things get more complicated Sad
Back to top
View user's profile Send private message Visit poster's website
Aezay
Senior Member
Senior Member


Joined: 12 Feb 2003
Posts: 247
Location: Denmark

PostPosted: Sun Feb 23, 2003 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
piranha
Junior Member
Junior Member


Joined: 07 Feb 2003
Posts: 70
Location: Miami, Fl

PostPosted: Sun Feb 23, 2003 8:58 pm    Post subject: Reply with quote

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" Laughing
Back to top
View user's profile Send private message Visit poster's website
Aezay
Senior Member
Senior Member


Joined: 12 Feb 2003
Posts: 247
Location: Denmark

PostPosted: Sun Feb 23, 2003 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Valentino
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 665
Location: Ukraine

PostPosted: Mon Feb 24, 2003 4:10 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Hacker
Moderator
Moderator


Joined: 06 Feb 2003
Posts: 9108
Location: Bratislava, Slovakia

PostPosted: Mon Feb 24, 2003 12:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
piranha
Junior Member
Junior Member


Joined: 07 Feb 2003
Posts: 70
Location: Miami, Fl

PostPosted: Mon Feb 24, 2003 1:12 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 24621
Location: Switzerland

PostPosted: Tue Feb 25, 2003 5:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sqa_wizard
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 2600
Location: Germany

PostPosted: Tue Feb 25, 2003 5:47 am    Post subject: Reply with quote

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
View user's profile Send private message
piranha
Junior Member
Junior Member


Joined: 07 Feb 2003
Posts: 70
Location: Miami, Fl

PostPosted: Tue Feb 25, 2003 8:21 am    Post subject: Reply with quote

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! Shocked
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group