Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

autoexec.bat

Oct
356
2
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
 
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
 
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
>
>
>
>
 
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
 
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
 
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?
 
Will TCSTART run before plugins are autoloaded from the plugins sub-directory is processed?

TCStart runs after the plugins are loaded; otherwise you couldn't use plugin commands in TCStart.
 
Back
Top