1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to Specify INI File

Discussion in 'Support' started by Jay Sage, Nov 7, 2014.

  1. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    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
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    This works here, from Start\Run and also from a TCC prompt.
    Code:
    v:\> g:\tc17\tcmd @g:\tc11\TCMD.INI
     
  3. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    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.
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,312
    Likes Received:
    39
    %_ININAME returns the name of the .INI file used by TCC.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    I know it worked because TCMD17 started with TCC11 in a tab. No doubt the v11 ini file I specified named TCC11 as comspec.
     
  6. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    /@c:\temp\tc17.ini works here.....
     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    ... which is not necessarily the one used by TCMD.
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    There are potentially *two* TCMD.INI files - the one used by TCMD, and the one used by TCC. If you specify a custom location for one, you're still going to get the default one for the other.
     
  9. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,312
    Likes Received:
    39
    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.
     
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    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.
     
  11. jbanaszczyk

    Joined:
    Jun 8, 2013
    Messages:
    98
    Likes Received:
    0
    :)
    Please no. Please don't use registry :)
    One of the most important words about TCC is "Portable".
     
  12. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    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
     
  13. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    I don't know what you're asking for -- can you provide an example?
     
  14. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    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.
     
  15. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    The help says this (which raises a question, see below).

    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. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,027
    Likes Received:
    0
    Yes it would be able to modify - but there would be a copy in %LocalAppData%\VirtualStore\
     
  18. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    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.
     
  19. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    It is documented; see "Locating the TCMD.INI File" in the "Initialization (.INI) Files" topic.
     
  20. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    How am I to gather that %LOCALAPPDATA is the default location?
     

Share This Page