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

starting tcmd with alternate INI file

Discussion in 'Support' started by CSGalloway@nc.rr.com, May 7, 2010.

  1. Take Command 8.02.106 Windows XP [Version 5.1.2600]
    Take Command Build 106 Windows XP Build 2600 Service Pack 3
    Registered to Charles S. Galloway - 5 System License

    I would like to start TCMD with an alternate INI file and have read the CHM file and I am not doing something correctly.

    INIfile = D:\TakeCommand\INIs\TCMD_v11.ini
    TCMD.EXE = C:\Program Files\JPSoft\TCMD11\tcmd.exe

    TCMD.EXE /@D:\TakeCommand\INIs\TCMD_v11.ini
    TCMD.EXE //@D:\TakeCommand\INIs\TCMD_v11.ini
    TCMD.EXE /D:\TakeCommand\INIs\TCMD_v11.ini

    all doesn't work for various reasons....

    Thanks in advance
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    The second and third examples will definitely *not* work. The first should,
    though you do not need the leading '/'.

    It would be useful to know what the "various reasons" are when using the
    first syntax.

    Rex Conn
    JP Software
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    | Take Command 8.02.106 Windows XP [Version 5.1.2600]
    ...
    | I would like to start TCMD with an alternate INI file and have read
    | the CHM file and I am not doing something correctly.

    My link file, listed below as analyzed by the SHORTCUT command, starts 4nt
    8.02.106 as you desire:

    Command=F:\JPSOFT\K08\4nt.exe
    Arguments=/@F:\JPSOFT\V08.INI
    Directory=F:\JPSOFT
    Description=Interpreter
    Link=C:\Documents and Settings\ESF\Desktop\JP I08 acsF4.lnk
    Icon=F:\JPSOFT\K08\4nt.exe
    Offset=0
    Mode=3
    Hotkey=Shift-Ctrl-Alt-F4

    Note that this scheme works for either INIKEY or registry key version, as
    long as the key file is properly generated and is stored in the same
    directory as the interpreter. This brings up the issue: which version are
    you using, is there a different path for the interpreter stored in the
    registry, etc.
    --
    HTH, Steve
     
  4. I have the shortcut as:
    shortcut "Take Command 11.0.lnk"

    Command=C:\PROGRA~1\JPSoft\TCMD11\tcmd.exe
    ArgumentsDirectory=C:\Program Files\JPSoft\TCMD11\
    Description=Execute Take Command v11.0
    Link=Take Command 11.0.lnk
    IconOffset=0
    Mode=1
    Hotkey
    and in TCMDv11:
    [C:\Program Files\JPSoft\TCMD11]echo %_ININAME
    C:\Documents and Settings\Charles\Local Settings\Application Data\JPSoft\TCMD.INI

    So it's not working....
    ----- Original Message -----
    From: rconn
    To: CSGalloway@nc.rr.com
    Sent: Friday, May 07, 2010 07:45 AM
    Subject: RE: [Support-t-1947] starting tcmd with alternate INI file


    Quote:
    > I would like to start TCMD with an alternate INI file and have read the
    > CHM file and I am not doing something correctly.
    >
    > INIfile = D:\TakeCommand\INIs\TCMD_v11.ini
    > TCMD.EXE = C:\Program Files\JPSoft\TCMD11\tcmd.exe
    >
    > TCMD.EXE /@D:\TakeCommand\INIs\TCMD_v11.ini
    > TCMD.EXE //@D:\TakeCommand\INIs\TCMD_v11.ini
    > TCMD.EXE /D:\TakeCommand\INIs\TCMD_v11.ini
    >
    > all doesn't work for various reasons....

    The second and third examples will definitely *not* work. The first should,
    though you do not need the leading '/'.

    It would be useful to know what the "various reasons" are when using the
    first syntax.

    Rex Conn
    JP Software
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    | I have the shortcut as:
    | shortcut "Take Command 11.0.lnk"
    |
    | Command=C:\PROGRA~1\JPSoft\TCMD11\tcmd.exe
    | ArgumentsDirectory=C:\Program Files\JPSoft\TCMD11\
    | Description=Execute Take Command v11.0
    | Link=Take Command 11.0.lnk
    | IconOffset=0
    | Mode=1
    | Hotkey

    I assume that the actual report is:

    Command=C:\PROGRA~1\JPSoft\TCMD11\tcmd.exe
    ArgumentsDirectory=C:\Program Files\JPSoft\TCMD11\
    Description=Execute Take Command v11.0
    Link=Take Command 11.0.lnk
    Icon=C:\PROGRA~1\JPSoft\TCMD11\tcmd.exe
    IconOffset=0
    Mode=1
    Hotkey
    (i.e., your copy and paste dropped trailing equal signs and the CR LF
    characters following, and the Icon= line).

    This is different from mine - it does not have any argument specifying the
    .INI file to be used!

    | and in TCMDv11:

    | [C:\Program Files\JPSoft\TCMD11]echo %_ININAME
    | C:\Documents and Settings\Charles\Local Settings\Application
    Data\JPSoft\TCMD.INI

    Yes, that's the default location and name of TCMD's .INI file. I think the
    command below would install the shortcut you want in the specific desktop
    directory you want it in:

    *cdd "C:\Documents and Settings\Charles\desktop"
    OR
    *cdd "C:\Documents and Settings\All Users\desktop"

    SHORTCUT "C:\Program Files\JPSoft\TCMD11\tcmd.exe"
    "@D:\TakeCommand\INIs\TCMD_v11.ini" "C:\Program Files\JPSoft\TCMD11\"
    "Execute Take Command v11.0" "Take Command 11.0.lnk" 1 "C:\Program
    Files\JPSoft\TCMD11\tcmd.exe" 0

    --
    HTH, Steve
     
  6. Thanks Steve,

    What I want to do is use the INI file on D: and any changes I make with OPTION and saved are written to the INI file on D:

    hopefully so that _ININAME returns the one on D: - not the one in %LOCALAPPDATA%\JpSoft

    I did SHORTCUT "C:\Program Files\JPSoft\TCMD11\tcmd.exe" "@D:\TakeCommand\INIs\TCMD_v11.ini" "C:\Program Files\JPSoft\TCMD11\" "Execute Take Command v11.0" "Take Command 11.0.lnk" 1 "C:\Program Files\JPSoft\TCMD11\tcmd.exe" 0

    and then launched it..... OPTION didn't have entries for the LOGGNG FILES but that exist in the INI file.


    ----- Original Message -----
    From: Steve Fábián
    To: CSGalloway@nc.rr.com
    Sent: Friday, May 07, 2010 06:34 PM
    Subject: RE: [Support-t-1947] starting tcmd with alternate INI file


    | I have the shortcut as:
    | shortcut "Take Command 11.0.lnk"
    |
    | Command=C:\PROGRA~1\JPSoft\TCMD11\tcmd.exe
    | ArgumentsDirectory=C:\Program Files\JPSoft\TCMD11\
    | Description=Execute Take Command v11.0
    | Link=Take Command 11.0.lnk
    | IconOffset=0
    | Mode=1
    | Hotkey

    I assume that the actual report is:

    Command=C:\PROGRA~1\JPSoft\TCMD11\tcmd.exe
    ArgumentsDirectory=C:\Program Files\JPSoft\TCMD11\
    Description=Execute Take Command v11.0
    Link=Take Command 11.0.lnk
    Icon=C:\PROGRA~1\JPSoft\TCMD11\tcmd.exe
    IconOffset=0
    Mode=1
    Hotkey
    (i.e., your copy and paste dropped trailing equal signs and the CR LF
    characters following, and the Icon= line).

    This is different from mine - it does not have any argument specifying the
    .INI file to be used!

    | and in TCMDv11:

    | [C:\Program Files\JPSoft\TCMD11]echo %_ININAME
    | C:\Documents and Settings\Charles\Local Settings\Application
    Data\JPSoft\TCMD.INI

    Yes, that's the default location and name of TCMD's .INI file. I think the
    command below would install the shortcut you want in the specific desktop
    directory you want it in:

    *cdd "C:\Documents and Settings\Charles\desktop"
    OR
    *cdd "C:\Documents and Settings\All Users\desktop"

    SHORTCUT "C:\Program Files\JPSoft\TCMD11\tcmd.exe"
    "@D:\TakeCommand\INIs\TCMD_v11.ini" "C:\Program Files\JPSoft\TCMD11\"
    "Execute Take Command v11.0" "Take Command 11.0.lnk" 1 "C:\Program
    Files\JPSoft\TCMD11\tcmd.exe" 0

    --
    HTH, Steve
     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    I haven't followed this thread closely. What question remains? I copied
    TCMD.INI to my desktop and removed everything from the [Buttons] section of the
    copy. The following works (giving me a TCMD with no buttons) when entered in
    the Start/Run dialog or as the target of a shortcut (also from a TCC command
    line).

    d:\tc11\tcmd.exe @e:\users\vefatica\desktop\tcmd.ini
    --
    - Vince
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    But, as seems to be happening elsewhere, though the "@..." inifile argument is in the LNKfile (and works), neither the shortcut's properties nor TCC's SHORTCUT command show it as an argument. What's up with that?
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    That's a Windows "feature".

    Rex Conn
    JP Software
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    On Fri, 07 May 2010 20:46:05 -0400, rconn <> wrote:

    |---Quote---
    |> But, as seems to be happening elsewhere, though the "@..." inifile
    |> argument is in the LNKfile (and works), neither the shortcut's
    |> properties nor TCC's SHORTCUT command show it as an argument. What's
    |> up with that?
    |---End Quote---
    |That's a Windows "feature".

    Seeing that you can't get such an arg **OUT** with SHORTCUT, can you get such an
    arg **IN** with SHORTCUT?
    --
    - Vince
     
  11. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    You can't get it out with *anything* (if the argument begins with @), not
    just SHORTCUT. That's why there's the alternate form of specifying TCMD.INI
    with the leading /.

    But you can get it in.

    Rex Conn
    JP Software
     
  12. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    | What I want to do is use the INI file on D: and any changes I make
    | with OPTION and saved are written to the INI file on D:
    |
    | hopefully so that _ININAME returns the one on D: - not the one in
    | %LOCALAPPDATA%\JpSoft
    |
    | I did SHORTCUT "C:\Program Files\JPSoft\TCMD11\tcmd.exe"
    | "@D:\TakeCommand\INIs\TCMD_v11.ini" "C:\Program
    | Files\JPSoft\TCMD11\" "Execute Take Command v11.0" "Take Command
    | 11.0.lnk" 1 "C:\Program Files\JPSoft\TCMD11\tcmd.exe" 0
    |
    | and then launched it..... OPTION didn't have entries for the LOGGNG
    | FILES but that exist in the INI file.

    That's probably because it was a new file. What you may want to do is to
    copy the "old" .INI file "C:\Documents and Settings\Charles\Local
    Settings\Application Data\JPSoft\TCMD.INI" to the new one, start TCMD, and
    then use OPTION.
    As Rex pointed out in this thread, the advice I gave you for the form of
    the SHORTCUT command was not the best. I had not realized (or just forgot)
    why my own shortcut files have the slash "/" before the at sign "@" in the
    2nd parameter of the SHORTCUT command. The / is needed for so that when
    Windows analyzes the shortcut file (right click the file icon, click on
    properties) or when TCC analyzes it with the SHORTCUT command, the
    "Arguments" returned would include be .INI file specification. The improved
    command is below (the / is the only difference):

    SHORTCUT "C:\Program Files\JPSoft\TCMD11\tcmd.exe"
    "/@D:\TakeCommand\INIs\TCMD_v11.ini" "C:\Program
    Files\JPSoft\TCMD11\" "Execute Take Command v11.0" "Take Command
    11.0.lnk" 1 "C:\Program Files\JPSoft\TCMD11\tcmd.exe" 0

    Rebuild your shortcut file, and copy the old .INI file to the new
    location, I think you will be happy.
    --
    HTH, Steve
     
  13. From my understanding it's a problem dealing with specifing the "@" in he Argument field in the LNK file.
    ----- Original Message -----
    From: vefatica
    To: CSGalloway@nc.rr.com
    Sent: Friday, May 07, 2010 08:21 PM
    Subject: RE: [Support-t-1947] starting tcmd with alternate INI file


    I haven't followed this thread closely. What question remains? I copied
    TCMD.INI to my desktop and removed everything from the [Buttons] section of the
    copy. The following works (giving me a TCMD with no buttons) when entered in
    the Start/Run dialog or as the target of a shortcut (also from a TCC command
    line).

    d:\tc11\tcmd.exe @e:\users\vefatica\desktop\tcmd.ini
    --
    - Vince
     
  14. PS. Why would you need the @ sign anyway -

    Rex - is TCMD just wanting the name of the INI file and not send the contents?
    ----- Original Message -----
    From: vefatica
    To: CSGalloway@nc.rr.com
    Sent: Friday, May 07, 2010 08:21 PM
    Subject: RE: [Support-t-1947] starting tcmd with alternate INI file


    I haven't followed this thread closely. What question remains? I copied
    TCMD.INI to my desktop and removed everything from the [Buttons] section of the
    copy. The following works (giving me a TCMD with no buttons) when entered in
    the Start/Run dialog or as the target of a shortcut (also from a TCC command
    line).

    d:\tc11\tcmd.exe @e:\users\vefatica\desktop\tcmd.ini
    --
    - Vince
     
  15. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    The @ tells TCMD that it's an .INI file. Otherwise, the filename would be
    interpreted as a COMSPEC setting or a command to execute at startup.

    Rex Conn
    JP Software
     
  16. vefatica,

    Using that syntax - what does echo %_ININAME return? Does it return

    e:\users\vefatica\desktop\tcmd.ini

    or %LocalAppData%\whatever.....
    ----- Original Message -----
    From: CSGalloway@nc.rr.com
    To: CSGalloway@nc.rr.com
    Sent: Saturday, May 08, 2010 04:22 PM
    Subject: RE: [Support-t-1947] starting tcmd with alternate INI file


    From my understanding it's a problem dealing with specifing the "@" in he Argument field in the LNK file.
    ----- Original Message -----
    From: vefatica
    To: CSGalloway@nc.rr.com
    Sent: Friday, May 07, 2010 08:21 PM
    Subject: RE: [Support-t-1947] starting tcmd with alternate INI file


    I haven't followed this thread closely. What question remains? I copied
    TCMD.INI to my desktop and removed everything from the [Buttons] section of the
    copy. The following works (giving me a TCMD with no buttons) when entered in
    the Start/Run dialog or as the target of a shortcut (also from a TCC command
    line).

    d:\tc11\tcmd.exe @e:\users\vefatica\desktop\tcmd.ini
    --
    - Vince
     

Share This Page