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

How to? Using a custom ini file with TCC from Take Command

Discussion in 'Support' started by DanS, Aug 21, 2014.

  1. DanS

    Joined:
    Aug 21, 2014
    Messages:
    7
    Likes Received:
    0
    I want to start my TCC instances in Take Command with a custom INI file. It seems like the INI file that I specified to Take Command (via the @ argument) is not automatically passed to TCC.

    I tried setting my COMSPEC to "C:\Program Files\JPSoft\TCMD16x64\TCC.EXE" @C:\Path\MyCustom.ini and that works fine. However, when I close Take Command and restart it the "@" part is missing from the COMSPEC in the Options dialog. When I start a new tab, the INI file is not being passed in.

    Looking at INI file, I see the line in the [TakeCommand] section:
    COMSPEC="C:\Program Files\JPSoft\TCMD16x64\TCC.EXE" @C:\Path\MyCustom.ini

    Hence, it seems like it is being truncated during load.

    Is there any way of making this work?
     
  2. Fross

    Joined:
    May 30, 2008
    Messages:
    224
    Likes Received:
    1
    Hell Dan,

    I use the following for my comspec in the TCMD config:

    c:\tcmd\tcc.exe @d:\users\michael\ConfigFiles\tcc\tcc.ini //tcstartpath=d:\users\michael\ConfigFiles\tcc

    This uses by customer tcc.ini file and also finds the aliases and functions files that I keep in the config directory. I've never had an issue with it being truncated.

    My tcmd.ini file contains the following which mirrors the dialogbox identically.

    COMSPEC=c:\tcmd\tcc.exe @d:\users\michael\ConfigFiles\tcc\tcc.ini //tcstartpath=d:\users\michael\ConfigFiles\tcc

    Sorry I can't solve your problem, but thought maybe another example might help.

    Michael
     
  3. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    I think that field is just intended to hold a filename, so it's truncating it at the first space after the closing quote. If your system has short filenames enabled, you might be able to hack around it using the SFN (without quotes).

    What is the object of the game? If you want all instances of TCC to use these .INI settings, put them in the default .INI file. If you only want one or two instances using these settings, use the "Tab 1", "Tab 2", etc. interface at the bottom; the Command field should handle both filename and arguments.
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,885
    Likes Received:
    29
    I have always used (at least) "/Q" in TCMD's COMSPEC. I can reproduce DanS's problem. If the first token in COMSPEC (the file name) is quoted then the remainder of the COMSPEC specification is lost when TCMD is stopped/restarted. All's well if the file name isn't quoted (and doesn't need to be). My simple test used
    Code:
    "d:\tc16\tcc.exe" /q
    After TCMD was stopped/restarted, the "/Q" was gone.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,885
    Likes Received:
    29
    While it seems to be a bug, it can apparently be worked around. If I use
    Code:
    "g:\tc16\tcc.exe" "/Q" //tcstartpath=g:\tc16
    only what's after "/Q" is discarded. If I use
    Code:
    "g:\tc16\tcc.exe" "/Q" "//tcstartpath=g:\tc16"
    nothing is discarded and it seems to work correctly. And as I said before,
    Code:
    g:\tc16\tcc.exe /Q //tcstartpath=g:\tc16
    works fine (but probably wouldn't if the file name needed quoting).
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    Clever! I'll bet
    Code:
    "g:\tc16\tcc.exe" "/Q //tcstartpath=g:\tc16"
    would work as well. (One pair of quotes for all the args.)
     
  7. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,016
    Likes Received:
    0
    How about

    <path to>tcc.exe /@<path to ini>tcc.ini

    ???
     
  8. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    I tried it. Vincent's right; it's something to do with the way spaces are handled, but only when there are quotes.
     

Share This Page