How can i know the TC configuratin file loaded by /i=
Moderators: Hacker, petermad, Stefan2, white
How can i know the TC configuratin file loaded by /i=
My two programs Ultra TC Start/Directory Menu Editor has a command called (Add Me) which add a link to the program at the end of your start or dir menu, when the program start by clicking this link it is run and load the start/directory menu from the default wincmd.ini founded in registery
but suppose you run TC using another configuration file by using the (/i=) parameter when my program run it will read the menu from the default configuration file not from the current file used by TC.
my question is how can i know the current configuration file used by TC?
is there is something like "Commander_Path"
Thanks for help
but suppose you run TC using another configuration file by using the (/i=) parameter when my program run it will read the menu from the default configuration file not from the current file used by TC.
my question is how can i know the current configuration file used by TC?
is there is something like "Commander_Path"
Thanks for help
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
I dont know much about this, but there must be an API function to enquire the command line used to start a process. The Process Explorer ( Sysinternals: http://www.sysinternals.com ) is able to show such information about any process in the system. Maybe asking Mark Russinovich could help?
I switched to Linux, bye and thanks for all the fish!
Yep, Process Explorer can do it and cmdline can do it:
http://www.diamondcs.com.au/index.php?page=console-cmdline
According to them:
http://www.diamondcs.com.au/index.php?page=console-cmdline
According to them:
IcfuCmdLine uses an undocumented technique discovered by DiamondCS to read the full commandline from every process, a trick that is basically achieved by reading memory in the right places. It doesn't use code injection or any other techniques that may cause unstability so it's very safe to use.
What i need is that when my program start can find (by itself not by another application) the current configuratin file used by TC if it is running.
I suggest that: if TC start with another configuration file it is create a registry value under "...\Software\Ghisler\Total Commander\" named say "CurrentIniFileName" and store the path of this file and delete it if it used the default ini file or when it is closed.
this will be very useful for any add-on work on the contents of TC configuration file.
just thought
I suggest that: if TC start with another configuration file it is create a registry value under "...\Software\Ghisler\Total Commander\" named say "CurrentIniFileName" and store the path of this file and delete it if it used the default ini file or when it is closed.
this will be very useful for any add-on work on the contents of TC configuration file.
just thought
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
Hmm, not im my case though, I have more instances of TC, one which I use, and one where I test my plugin I develop, and they have different ini paths. So if I start the second instance of TC, it overwrites the first instance's registry notes. And of course I want to use the first instance's ini settings...I suggest that: if TC start with another configuration file it is create a registry value under "...\Software\Ghisler\Total Commander\" named say "CurrentIniFileName" and store the path of this file and delete it if it used the default ini file or when it is closed. this will be very useful for any add-on work on the contents of TC configuration file.
I switched to Linux, bye and thanks for all the fish!
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
2norfie
There are 2 problems with that:
1. It does not solve the more TC instances problem, and
2. Those environment variables are only available in the current process (TC) and its child processes (programs started from this TC instance). I think there is a way to propagate them to the system level (as Explorer does), but then still point 1 is intact.
There are 2 problems with that:
1. It does not solve the more TC instances problem, and
2. Those environment variables are only available in the current process (TC) and its child processes (programs started from this TC instance). I think there is a way to propagate them to the system level (as Explorer does), but then still point 1 is intact.
I switched to Linux, bye and thanks for all the fish!
this can be solved by TC on GotFocus event update this value so each time you swich from one instance to another an add-on can always find the correct configuration file in this value.SanskritFritz wrote:Hmm, not im my case though, I have more instances of TC, one which I use, and one where I test my plugin I develop, and they have different ini paths. So if I start the second instance of TC, it overwrites the first instance's registry notes. And of course I want to use the first instance's ini settings...I suggest that: if TC start with another configuration file it is create a registry value under "...\Software\Ghisler\Total Commander" named say "CurrentIniFileName" and store the path of this file and delete it if it used the default ini file or when it is closed. this will be very useful for any add-on work on the contents of TC configuration file.
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary