Unable to Specify INI File

Jun 2, 2008
284
1
Newton, MA
#1
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
 
Jun 2, 2008
284
1
Newton, MA
#3
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.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,619
46
Albuquerque, NM
prospero.unm.edu
#4
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.
 

rconn

Administrator
Staff member
May 14, 2008
10,588
97
#10
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.
 
Jun 2, 2008
284
1
Newton, MA
#12
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
 
#14
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.
 
Jun 2, 2008
284
1
Newton, MA
#15
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
 
#16
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?
 
#17
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\
 

rconn

Administrator
Staff member
May 14, 2008
10,588
97
#19
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.
 
#20
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.