Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Unable to Specify INI File

Jun
552
4
When I run the following command (from TCC or even CMD)

tcmd.exe @c:\temp\tcmd17.ini​

TCMD starts up, but the ini file is nevertheless the default file

C:\Users\Jay\AppData\Local\JPSoft\TCMD.INI​

What am I doing wrong? I think I am following what is written in the help files for specifying a custom INI file.

-- Jay
 
This works here, from Start\Run and also from a TCC prompt.
Code:
v:\> g:\tc17\tcmd @g:\tc11\TCMD.INI
 
Vince,

How do you know that it worked? I'm finding the situation somewhat confusing. When I did some edits using the Options tab, they seem to have appeared in the specified INI file, but the variable _ininame shows the default name. So maybe the problem is with the _ininame variable.

-- Jay

P. S. No, I just tried deleting the INI file in the default directory and running the command with the specified directory, and it came up in the mode for no INI file. So there is definitely something wrong here. It's also not a new problem. I had it at least with version 16. I just gave up and let TCMD use the default INI file. It is annoying, though, when one is trying to run two different versions of TCMD.
 
How do you know that it worked? I'm finding the situation somewhat confusing. When I did some edits using the Options tab, they seem to have appeared in the specified INI file, but the variable _ininame shows the default name. So maybe the problem is with the _ininame variable.

%_ININAME returns the name of the .INI file used by TCC.
 
I know it worked because TCMD17 started with TCC11 in a tab. No doubt the v11 ini file I specified named TCC11 as comspec.
 
Rex, with each new version for ten years I've been expecting you to scuttle the .INI file and move everything into the registry. So far, you've lost me every bet.
 
Rex, with each new version for ten years I've been expecting you to scuttle the .INI file and move everything into the registry. So far, you've lost me every bet.

Whenever the subject has been broached, a significant percentage of users go berserk and demands that the ini directives stay in a file.

However, *some* stuff is in the registry -- the TCMD window positions, autohide status, menu customizations, etc.
 
Thanks to all who pointed out the TCMD and TCC don't automatically use the same INI file. That solved my problem. It was a bit messy to get everything working, but I seem to have succeeded now.

Rex, is there any reason why each version of TCMD/TCC could not by default use an INI file with the version number in it? That would make life easier for those of us trying to run two different versions.

-- Jay
 
TCMD17.INI, TCMD18.INI, TCMD19.INI, ... (with TCMD.INI as a fallback) ... all in APPDATA (which I don't use) ... seems reasonable.

OTOH, Jay, if you put the INI files in the install directories, each version would have its own default.
 
Rex,

Sorry. I forgot that you have to read a lot of messages and would not remember all the background in this thread. I meant that version 17 of TCMD and TCC should, by default, use TCMD17.INI. Version 18 would use TCMD18.INI.

Vince, are you saying that TCMD and TCC would look first in the directory where tcmd.exe and tcc.exe are located, before looking in the APPDATA area? That would solve the problem, but it appeared to me that TCMD created its INI files in the APPDATA area. I'll experiment now to see what happens if I copy my TCMD17.INI in the APPDATA area to TCMD.INI in the "C:\Program Files\JPSoft\TCMD17x64" directory.

-- Jay
 
The help says this (which raises a question, see below).

When starting Take Command or a Take Command Console(TCC) shell:

If there is an @d:\path\inifile option on the startup command line, Take Command will use the path and file name specified there.

Otherwise, the default TCMD.INI file name is used, and the search starts in the directory where the Take Command program file is stored. If the .INI file is not found, Take Command will look in the %LOCALAPPDATA% directory.

If no .INI file is found, all options are set to their default values. A new .INI file will be created, using the default location and name, as explained above.

Question: "Default location" ??? A default location is not mentioned. Considering that it looks **FIRST** in TCMD.EXE's directory, I'd consider that the default location. But, in fact, if no INI file is available, TCMD creates it in %LOCALAPPDATA.

It'd probably be a good idea if the help was more specific and mentioned %LOCALAPPDATA\JPSoft.

So, Jay, yes, it looks in first in the directory where the EXEs are. I have an ancient TCMD.INI in the appdata tree; it never gets used.

Another question: If the INI file were in, say, "C:\Program Files\JPSoft\TCMD17x64" would TCC/TCMD, unelevated, be able to modify it if the default permissions were in place?
 
Another question: If the INI file were in, say, "C:\Program Files\JPSoft\TCMD17x64" would TCC/TCMD, unelevated, be able to modify it if the default permissions were in place?

Yes it would be able to modify - but there would be a copy in %LocalAppData%\VirtualStore\
 
Yes it would be able to modify - but there would be a copy in %LocalAppData%\VirtualStore\
Ah so! ... Windows smoke and mirrors.

Moving from X86 to X64 (if/when I do) on a system where 95% of my software is 32-bit should take that to a new level.
 
Question: "Default location" ??? A default location is not mentioned. Considering that it looks **FIRST** in TCMD.EXE's directory, I'd consider that the default location. But, in fact, if no INI file is available, TCMD creates it in %LOCALAPPDATA.

It is documented; see "Locating the TCMD.INI File" in the "Initialization (.INI) Files" topic.
 
It is documented; see "Locating the TCMD.INI File" in the "Initialization (.INI) Files" topic.
How am I to gather that %LOCALAPPDATA is the default location?
Locating the TCMD.INI File

When starting Take Command or a Take Command Console(TCC) shell:

If there is an @d:\path\inifile option on the startup command line, Take Command will use the path and file name specified there.

Otherwise, the default TCMD.INI file name is used, and the search starts in the directory where the Take Command program file is stored. If the .INI file is not found, Take Command will look in the %LOCALAPPDATA% directory.

If no .INI file is found, all options are set to their default values. A new .INI file will be created, using the default location and name, as explained above.
 

Similar threads

Back
Top