autoexec.bat

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Oct 18, 2008
265
1
#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
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
 

samintz

Scott Mintz
May 20, 2008
1,228
11
Solon, OH, USA
#3
I have this as the first line of TCSTART.BTM:

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

-Scott

Steve F$BaC(Bi$BaO(B <> wrote on 09/30/2009 12:16:02 PM:


> 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
>
>
>
>
 
#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
 
May 29, 2008
521
3
Groton, CT
#5
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


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
 
Oct 18, 2008
265
1
#6
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
Greetings --

Will TCSTART run before plugins are autoloaded from the plugins sub-directory is processed?