Unable to Specify INI File

Jun 2, 2008
386
2
Newton, MA
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
 
May 20, 2008
11,538
103
Syracuse, NY, USA
This works here, from Start\Run and also from a TCC prompt.
Code:
v:\> g:\tc17\tcmd @g:\tc11\TCMD.INI
 
Jun 2, 2008
386
2
Newton, MA
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
4,495
91
Albuquerque, NM
prospero.unm.edu
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.
 
May 20, 2008
11,538
103
Syracuse, NY, USA
I know it worked because TCMD17 started with TCC11 in a tab. No doubt the v11 ini file I specified named TCC11 as comspec.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,495
91
Albuquerque, NM
prospero.unm.edu
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
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
386
2
Newton, MA
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
 
May 20, 2008
11,538
103
Syracuse, NY, USA
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
386
2
Newton, MA
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
 
May 20, 2008
11,538
103
Syracuse, NY, USA
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?
 
Apr 2, 2011
1,462
10
54
North Carolina, USA
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\
 
May 20, 2008
11,538
103
Syracuse, NY, USA
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
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.
 
May 20, 2008
11,538
103
Syracuse, NY, USA
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
Thread starter Title Forum Replies Date
N Unable to bind multiple keys to the same key mapping directive Support 9
A Unable to pass batch file arguments unaltered Support 18
Eric Peters New Computer, unable to register Support 3
A Unable to register TC23 Support 1
D Unable to uninstall TCC 21 Support 1
G How to? Unable to install TCMD 21 under Win2012R2 Support 5
K Unable to register TakeCommand Support 4
W Unable to register TCMD v21 Support 16
dcantor Unable to access help Support 9
WavSlave Fixed Unable to sort files by description in TCC v19 Support 2
nickles WAD del unable to delete files ending in "." Support 18
R Unable to start any BTM file from Explorer Support 5
M I'm unable to use @replace[] with a % character in string2 Support 12
thedave WAD Unable to type various characters using Windows 8's onscreen keyboard Support 7
Dan Glynhampton Fixed @version "force" flag not working, and unable to set separator Support 3
D ftps gives "Unable to build data connection" Support 5
M Why am I unable to delete files? Support 8
Y Unable to register v13. Support 1
Y Unable to close v13 Support 26
N Unable to end tcc.exe process Support 1
Y Unable to install 10.00.50 Support 3
G Documentation on TCMD.INI Support 9
RChrismon How to? Copy TCMD.INI to New Version Support 7
vefatica Documentation INI file location? Support 2
D Custom ini-file is not read, by tcmd.exe cli Support 6
Alpengreis Fixed New INI directive "ANSIWin10" is invalid Support 2
Alpengreis TCMD.INI: The "super hidden" problem ... Support 6
D Fresh instance of TCMD does not use TCMD.INI Support 7
C Optimum Placement for TCMD.ini and others? Support 6
cgunhouse Documentation Locating the TCMD.INI File Support 9
D V19: toolbar /r "path\tctoolbar.ini" Support 1
B Fixed Error messages from TCMD.INI Support 2
C tcmd.ini not loading from program dir? Support 5
Detlef Fixed ParameterChar in TCMD.INI no longer working Support 35
Jay Sage Toolbar Update to INI File Not Working Support 10
Jay Sage How to Determine INI File Used by TCMD Support 6
A How to? TCC/LE: How do you add "edit-mode=insert" to ini file? Support 9
D How to? Using a custom ini file with TCC from Take Command Support 7
cgunhouse TCMD.INI Issue Support 7
Fross TCC INI Support 2
Jay Sage Specified INI File Refuses to Run Support 3
T TCTOOLBAR /C & TCTOOLBAR /I should reload toolbar from TCMD.INI, right? Support 1
T TCC reading TCMD.INI causing "Invalid item name" warnings and pauses Support 2
D ini directives and @select example in Help Support 0
nickles Reload tcmd.ini from the command line Support 11
deleyd How to? Alias in TCMD.INI file? Support 2
J Extended directory search - cure by renaming tcmd.ini Support 10
A How to? How to enable UTF-8 output in tcmd.ini Support 9
C Env vars in tcmd.ini Support 12
C multi-INI file merging Support 1

Similar threads