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

autoexec.bat

Discussion in 'Open Forum' started by fpefpe, Sep 30, 2009.

  1. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    258
    Likes Received:
    1
    Greetings --

    I been using autoexec.bat to set env vars ... this worked in win2k and xp -- it does not seem to work in vista ... has anyone used autoexcec.bat in this way? Thanks
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    fpefpe wrote:
    | Greetings --
    |
    | I been using autoexec.bat to set env vars ... this worked in win2k
    | and xp -- it does not seem to work in vista ... has anyone used
    | autoexcec.bat in this way? Thanks

    My vistas are not the same as Gates', only XP spoken here. Doing all
    your initialization in TCSTART.BTM will always work. Just make sure you
    bypass the initialization when in a secondary shell, i.e., one on the right
    side of a pipe. I start mine with "if %_pipe eq 1 quit" to achieve this.

    I've not used AUTOEXEC.BAT even in the 4DOS days (back then because many
    junkware vendors modified it unconsciounably). Its use in console sessions
    that are not started directly by the OS (through a desktop shortcut, the RUN
    dialog, a Windows association of .BTM with TCC, etc.) is arcane. OTOH
    TCSTART is guaranteed to be used, unless the startup command contains option
    /IS (primary session only, not in pipes), or the .INI file contains a
    directive StartupFile=No.
    --
    HTH, Steve
     
  3. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,201
    Likes Received:
    11
    I have this as the first line of TCSTART.BTM:

    if %_pipe != 0 .or. %_transient != 0 .or. %_ide != 0 quit

    -Scott

    Steve F畸i疣 <> wrote on 09/30/2009 12:16:02 PM:



    right


    sessions

    RUN

    option

     
  4. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    samintz wrote:
    | I have this as the first line of TCSTART.BTM:
    |
    | if %_pipe != 0 .or. %_transient != 0 .or. %_ide != 0 quit

    I tried to keep it simple. Transients are rare, and _IDE is neither in V9 or
    earlier, nor in any TCCLE. My whole TCSTART.BTM is:

    @if %_pipe eq 0 .and. %_transient EQ 0 .and. "%_ide" NE "1"
    %@path[%_batchname]BEGIN.BTM

    and I keep BEGIN.BTM in the same directory.
    --
    Steve
     
  5. dcantor

    Joined:
    May 29, 2008
    Messages:
    508
    Likes Received:
    3


    Mine is just a little more complicated, but is equally usable in TCC V9, V10, and V11:
    Code:
    set modebits=%_transient%%_pipe%%_ide%
    iff %modebits ne 0 then
      option //histfile= //dirhistfile=
      goto end
     endiff
    
    ...
    
    :end
    quit
    
     
  6. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    258
    Likes Received:
    1
    Greetings --

    Will TCSTART run before plugins are autoloaded from the plugins sub-directory is processed?
     
  7. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,353
    Likes Received:
    39
    TCStart runs after the plugins are loaded; otherwise you couldn't use plugin commands in TCStart.
     

Share This Page