Welcome!

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

SignUp Now!

@EXECSTR clobbers @ECHO ON

May
12,798
160
I'm accustomed to seeing all that my logon script does because it starts with @ECHO ON. I don't any more. I don't restart often so I can't say how new this behavior is, but it is new. I have whittled it down to the following test BTM.
Code:
@echo on
iff "%@execstr[netstat -ano]" == "" then
    echo foo
endiff
echo 1
echo 2

Here's its output.
Code:
iff "%@execstr[netstat -ano]" == "" then
foo
1
2

No further commands are echoed! Missing are "echo foo", "echo 1", and "echo 2".

Compare it to this (with @EXECSTR removed).
Code:
@echo on
iff 1 == 1 then
    echo foo
endiff
echo 1
echo 2

Output:
Code:
iff 1 == 1 then
echo foo
foo
echo 1
1
echo 2
2
 
Code:
C:\>type test.btm
@echo on
echo
echo "%@execstr[subst]"
echo

C:\>test.btm
echo
ECHO is ON
echo ""
""
ECHO is OFF

C:\>

Okay, that's odd. Tried temporarily renaming my TCSTART.BTM, but that didn't make any difference.
 
Here's another look at it, from CMD, comparing v24 and v25.

Code:
v:\> type ltest.btm
@echo on
iff "%@execstr[netstat -ano]" == "" then
        echo foo
endiff
echo 1
echo 2

v:\> d:\tc24\tcc.exe /c ltest.btm
iff "%@execstr[netstat -ano]" == "" then
echo foo
foo
echo 1
1
echo 2
2

v:\> d:\tc25\tcc.exe /c ltest.btm
iff "%@execstr[netstat -ano]" == "" then
foo
1
2
 

Similar threads

Back
Top