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

USB - based TCC question

Discussion in 'T&T - Miscellaneous' started by Steve Fabian, Oct 1, 2008.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Anyone has a suggestion how a USB-based TCC (inikey version, of course) can
    be made to operate regardless of the drive letter assigned to the USB drive
    on the specific system?
    --
    Steve
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,187
    Likes Received:
    11
    Steve,

    I've never tried the INI key version. How is the drive letter being used?
    Are there absolute paths in the INI file? Have you tried changing the
    absolute paths to relative paths?

    e.g. I:\Tcmd.ini => .\Tcmd.ini

    -Scott

    "JP Software Forums" <neil@jpsoft.com> wrote on 10/01/2008 01:19:16 PM:


    can

    drive

     
  3. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    Doggone it, the wiki's gone now. Let's see... (google google, copy paste)

    web.archive.org/web/20071206103439/jpsoftwiki.com/wiki/index.php?title=4NT_on_a_stick
     
    #3 Charles Dye, Oct 1, 2008
    Last edited by a moderator: May 26, 2017
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    That info is a little dated now, of course. The inikey file replaces TakeCmd.dll, not 4NT.EXE. The autoplay stuff still works on XP SP3, but I don't think it works under Vista. (Bad Vista - no cookie!) You'll probably want to launch TCC.EXE instead of 4NT.EXE. (Or you can launch TCMD.EXE, but you may have to adjust windows sizes and placement, hotkeys, etc. for each machine you run it on. The inikey version still stores that stuff in the registry.)
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    JP Software Forums" <neil@jpsoft.com>; "samintz wrote:
    | Steve,
    |
    | I've never tried the INI key version. How is the drive letter being
    | used? Are there absolute paths in the INI file? Have you tried
    | changing the absolute paths to relative paths?
    |
    | e.g. I:\Tcmd.ini => .\Tcmd.ini

    Thanks for the response.

    The relative paths don't work in the INCLUDE directive, nor in the
    invocation command specifying the name and location of the configuration
    file. In earlier versions (V7 and before, don't remember about V8) the
    configuration file could be specified without a path, if it was in the
    startup directory (which did not need to be the location of 4NT.EXE). I
    never tried /@.\x.ini however, it's certainly worth a try.
    --
    Steve
     
  6. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    JP Software Forums" <neil@jpsoft.com>; "Charles Dye wrote:
    | ---Quote (Originally by Steve Fábián)---
    | Anyone has a suggestion how a USB-based TCC (inikey version, of
    | course) can be made to operate regardless of the drive letter
    | assigned to the USB drive on the specific system?
    | ---End Quote---
    | Doggone it, the wiki's gone now. Let's see... (google google, copy
    | paste)
    |
    |
    [/URL]

    Thanks, I found it, and copied it to my own system so I can read it at my
    leasure.
    --
    Steve
     
  7. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    JP Software Forums" <neil@jpsoft.com>; "Charles Dye wrote:
    | ---Quote (Originally by Charles Dye)---
    |
    [/URL]
    | ---End Quote---
    | That info is a little dated now, of course. The inikey file replaces
    | TakeCmd.dll, not 4NT.EXE. The autoplay stuff still works on XP SP3,
    | but I don't think it works under Vista. (Bad Vista - no cookie!)
    | You'll probably want to launch TCC.EXE instead of 4NT.EXE. (Or you
    | can launch TCMD.EXE, but you may have to adjust windows sizes and
    | placement, hotkeys, etc. for each machine you run it on. The inikey
    | version still stores that stuff in the registry.)


    Thanks!

    I don't even use TCMD at home, so it is not one I'd use elsewhere.

    I don't know yet whether or not I need to deal with Vista. If so, I'll have
    to figure out how...
    --
    Steve
     
    #7 Steve Fabian, Oct 1, 2008
    Last edited by a moderator: Sep 5, 2017
  8. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    2
    I use a .cmd file that sets a few key environment variables, then my %path%, 4start.btm and alias/function/set files reference those variables instead of hardcoded paths.

    In batch files I'm used to define paths relative to %@path[%_batchname].

    You may also want to start TCC from a portable menu utility (there are many free ones), because they usually provide a special variables set to the current USB drive letter.
     
  9. K_Meinhard

    Joined:
    May 20, 2008
    Messages:
    310
    Likes Received:
    0
    Steve,


    Take a look at [title] . You
    can enable autostart for USB drives.


    Then a @full[%0] in e.g. TCCStart.btm should give you the current drive
    letter. You could parse that and take it from there.

    * Klaus Meinhard *
    4DOS Info - Info for DOS
    www.4dos.info
     
  10. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    JP Software Forums" <neil@jpsoft.com>; "K_Meinhard wrote:
    | Take a look at
    |
    | . You can enable autostart for USB drives.
    |
    |
    | Then a @full[%0] in e.g. TCCStart.btm should give you the current
    | drive
    | letter. You could parse that and take it from there.

    Thank you and all the others. This is an aspect of JPsoft program operation
    I had not had previous reason (nor opportunity) to try.

    I have long been using "relative addressing" for my paths, using a
    per-system "LOCAL.SET" file parsed by SET /R to set variables to critical
    directories. I learned to do things this way when I had accounts on multiple
    time-shared computers, and my "home" directory was not the same on any two
    of them. I separated my batch programs into generic ones, and into ones
    needed only on a single system. The ones only needed locally went into a
    subdirectory LOCAL (nowadays I shortened it to LOC), all others into UTIL.

    The way I see it the major problems with the usb-stick is that an absolute
    path is needed to start it - unless you use autorun. Once you are past that
    you probably need a quick-launch or desktop icon for repeated use, but you
    don't want to leave it there when the stick is removed; though this is not
    critical - the icons change to an "unreachable program" icon whenever the
    desktop is refreshed and the stick is not ready. To create these icons you
    probably need to run a TCC batch file, which creates them with absolute
    paths. I think the best place to do this is the batch program started in
    autorun.
    --
    Steve
     

Share This Page