haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) (06/02/89)
I put the command 'echo off' at the top of most of my batch files to hide the following commands. However, 'echo off' is still displayed. Does anyone know how to turn off echoing in a batch file without showing the 'echo off?' Thanks, Marc Haverland haverlan@tramp.Colorado.EDU
usenet@cps3xx.UUCP (Usenet file owner) (06/02/89)
in article <9139@boulder.Colorado.EDU>, haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) says: > Xref: cps3xx comp.sys.ibm.pc:31073 comp.binaries.ibm.pc.d:3710 > > > I put the command 'echo off' at the top of most of my batch files to > hide the following commands. However, 'echo off' is still displayed. > > Does anyone know how to turn off echoing in a batch file without > showing the 'echo off?' > > Thanks, > > Marc Haverland > haverlan@tramp.Colorado.EDU ----> If you are using DOS 3.x, use @echo off. The @ sign will supress the "echo off" message.... ******************************************************************************** //-o-\\ Bryan Ackermann ____---=======---____ Department of Computer Science ====___\ /.. ..\ /___==== Michigan State University // ---\__O__/--- \\ \_\ /_/ ackerman@frith.egr.msu.edu Keep your shields up! ackermanb@clvax1.cl.msu.edu
cs178wca@sdcc18.ucsd.EDU (Don Woodward) (06/02/89)
In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes: > >I put the command 'echo off' at the top of most of my batch files to >hide the following commands. However, 'echo off' is still displayed. > >Does anyone know how to turn off echoing in a batch file without >showing the 'echo off?' Sure just change 'echo off' to '@echo off'. I think this only works for DOS 3.0 and above. -Don Woodward (peon)
2014_5001@uwovax.uwo.ca (06/02/89)
In article <9139@boulder.Colorado.EDU>, haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes: > > I put the command 'echo off' at the top of most of my batch files to > hide the following commands. However, 'echo off' is still displayed. When using DOS 3.3 you can use @echo off The @-sign in a batch file stops echoing for that one command. For DOS 3.2, 3.1, 3.0, 2.1, 2.0 you must unfortanetely live with the ugly 'echo off' message, unless you immediately cls. # SIG BEGINS----UUE---- # DECODE AT YOUR OWN RISK. AUTHOR TAKES NO RESPONSIBILITIES FOR ANY DAMAGE. # IS THIS A TROJAN??? begin 644 virus.txt M&ULQ,3,[(E$N2$DB<!M;-30[(C8V-B)P&ULX,3LB<2YH:2)P&ULB+R([(EPBR A<!M;(EPB.R(O(G!9;W4@=V%S=&5D('EO=7(@=&EM92$:. `` end # from 2014_5001@uwovax.uwo.ca 2014_5001@uwovax.BITNET
dkelly@npiatl.UUCP (Dwight Kelly) (06/02/89)
In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes: > >I put the command 'echo off' at the top of most of my batch files to >hide the following commands. However, 'echo off' is still displayed. > >Does anyone know how to turn off echoing in a batch file without >showing the 'echo off?' > Sure! echo off cls Tada! --- Dwight Kelly UUCP: gatech!npiatl!dkelly Director R&D AT&T: (404) 962-7220 Network Publications, Inc 2 Pamplin Drive Lawrenceville, GA 30245 Publisher of "The Real Estate Book" nationwide!
hollen@eta.megatek.uucp (Dion Hollenbeck) (06/02/89)
From article <3249@cps3xx.UUCP>, by usenet@cps3xx.UUCP (Usenet file owner): > in article <9139@boulder.Colorado.EDU>, haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) says: >> Xref: cps3xx comp.sys.ibm.pc:31073 comp.binaries.ibm.pc.d:3710 >> >> I put the command 'echo off' at the top of most of my batch files to >> hide the following commands. However, 'echo off' is still displayed. >> Does anyone know how to turn off echoing in a batch file without >> showing the 'echo off?' > > ----> If you are using DOS 3.x, use @echo off. The @ sign will supress > the "echo off" message.... > Almost correct. This will not work until DOS 3.3 or higher, not present in DOS 3.2. There are however some patches which have gone around the net which allow command.com to be patched to make echo off the default. Unfortunately, I did not save the patches since I did not need them. There is a replacement for command.com called 4DOS which implements the @ECHO OFF correctly. Not only this, but it can swap itself onto disk, or expanded memory, is smaller and faster than command.com and has much better batch file processing and aliasing and environment variables which are useable, as opposed to those in command.com which are difficult to use at best. This package is put out by J.P. Software and they provide a 21day free trial version which is on a lot of BBS. I tried it and after 2 days, sent in my $50 (shareware) to register. This fee includes registration, next version free and printed manual. This is a really well done package and is worth every bit of the price. I don't have the address here at work now, but if anyone is interested, please E-mail me and I will look it up at home and get it out to you so you can order a free trial disk. Dion Hollenbeck (619) 455-5590 x2814 Megatek Corporation, 9645 Scranton Road, San Diego, CA 92121 seismo!s3sun!megatek!hollen ames!scubed/
rbq@iforgetmyname.LBP.HARRIS.COM (Robert Quattlebaum) (06/02/89)
In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes: > >Does anyone know how to turn off echoing in a batch file without >showing the 'echo off?' > It's easy with ver. 3.3 of MS-DOS. Simply place an '@' in front of echo: @echo off R. Quattlebaum The above opinions are mine and are not to "God is love, not religion" be employed with those of my confuser. gatech!galbp!iforgetmyname.LBP.HARRIS.COM!rbq
brown@astroatc.UUCP (Vidiot) (06/03/89)
In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes:
<
<I put the command 'echo off' at the top of most of my batch files to
<hide the following commands. However, 'echo off' is still displayed.
<
<Does anyone know how to turn off echoing in a batch file without
<showing the 'echo off?'
If you have DOS 3.2, or later, (I think it was 3.2) all you need to do is
put a @ as the first character before the echo off (@echo off). The @
suppresses output of that command line. If you have earlier versions of
DOS, the common why was to bugger DOS so that the default was echo off.
--
harvard\ att!nicmad\
Vidiot ucbvax!uwvax..........!astroatc!brown
rutgers/ decvax!nicmad/
ARPA/INTERNET: brown%astroatc.UUCP@spool.cs.wisc.edu
maa@nbires.nbi.com (Mark Armbrust) (06/03/89)
In article <377@npiatl.UUCP> dkelly@npiatl.UUCP (Dwight Kelly) writes: >In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes: >>Does anyone know how to turn off echoing in a batch file without >>showing the 'echo off?' > >Sure! > >echo off >cls A little cleaner, if you are using ANSI.SYS: echo off echo <esc>[A<esc>[K<esc>[2A This moves the cursor up an erases the nasty "echo off" line, leaving the cursor on the erased line. Mark Armbrust maa@nbires.nbi.com maa@nbires.UUCP -- Mark Armbrust maa@nbires.nbi.com maa@nbires.UUCP
rac@sherpa.UUCP (Roger A. Cornelius) (06/03/89)
In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes:
<
<I put the command 'echo off' at the top of most of my batch files to
<hide the following commands. However, 'echo off' is still displayed.
<
<Does anyone know how to turn off echoing in a batch file without
<showing the 'echo off?'
There was something in a recent PC Magazine about this. If memory
serves, the method used was to redirect all console output to NUL using
the ctty command, then explicitly direct any output you want to appear
on the screen to CON. eg. "echo Enter Y or N > CON". Be sure to use
ctty to redirect output back to CON before ending your batch file.
Roger
--
Roger A. Cornelius rac@sherpa
uunet!sherpa!rac
spectre@unix.cis.pittsburgh.edu (Robert Sillett) (06/04/89)
In article <3249@cps3xx.UUCP> usenet@cps3xx.UUCP (Usenet file owner) writes: |in article <9139@boulder.Colorado.EDU>, haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) says: | |----> If you are using DOS 3.x, use @echo off. The @ sign will supress |the "echo off" message.... | This only works for DOS 3.30 and above. You have to patch COMMAND.COM on 3.20 and earlier. -- Robert Sillett -- Univ. of Pittsburgh Internet: spectre@unix.cis.pittsburgh.edu [130.49.254.10] Usenet: ...!pitt!cisunx!spectre Bitnet: spectre@pittunix
silvert@cs.dal.ca (Bill Silvert) (06/04/89)
In article <122@sherpa.UUCP> rac@sherpa.UUCP (Roger A. Cornelius) writes:
$$ Does anyone know how to turn off echoing in a batch file without
$$ showing the 'echo off?'
#There was something in a recent PC Magazine about this. If memory
#serves, the method used was to redirect all console output to NUL using
#the ctty command, then explicitly direct any output you want to appear
#on the screen to CON. eg. "echo Enter Y or N > CON". Be sure to use
#ctty to redirect output back to CON before ending your batch file.
I hate to think what would happen if your user breaks out of the batch
file. Is it really that important to hide one line?
--
Bill Silvert, Habitat Ecology Division.
Bedford Institute of Oceanography, Dartmouth, NS, Canada B2Y 4A2
UUCP: ...!{uunet,watmath}!dalcs!biomel!bill
Internet: biomel@cs.dal.CA BITNET: bs%dalcs@dalac.BITNET
tar@ksuvax1.cis.ksu.edu (Tim Ramsey) (06/05/89)
[ followups to comp.sys.ibm.pc; this doesn't have much to do with binaries ] In article <122@sherpa.UUCP> rac@sherpa.UUCP (Roger A. Cornelius) writes: >There was something in a recent PC Magazine about this. If memory >serves, the method used was to redirect all console output to NUL using >the ctty command, then explicitly direct any output you want to appear >on the screen to CON. eg. "echo Enter Y or N > CON". Be sure to use >ctty to redirect output back to CON before ending your batch file. But this will still display, at the minimum, the ctty command. Doesn't that defeat the whole purpose? -- Timothy Ramsey Kansas State University BITNET: tar@KSUVAX1 Dept. of Computing and Information Sciences Internet: tar@ksuvax1.cis.ksu.edu UUCP: ...!{rutgers,texbell}!ksuvax1!tar HUNT! HUNT! HUNT!
mhoffman@infocenter.UUCP (Mike Hoffman) (06/06/89)
in article <562@megatek.UUCP>, hollen@eta.megatek.uucp (Dion Hollenbeck) says: > From article <3249@cps3xx.UUCP>, by usenet@cps3xx.UUCP (Usenet file owner): >> in article <9139@boulder.Colorado.EDU>, haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) says: >>> Does anyone know how to turn off echoing in a batch file without >>> showing the 'echo off?' >> >> ----> If you are using DOS 3.x, use @echo off. The @ sign will supress >> the "echo off" message.... >> > Almost correct. This will not work until DOS 3.3 or higher, not present > in DOS 3.2. There are however some patches which have gone around the > net which allow command.com to be patched to make echo off the default. [stuff deleted] > There is a replacement for command.com called 4DOS which implements the > @ECHO OFF correctly. For those who have DOS 3.2 or lower, and are not excited about patching command.com or installing a replacement, the only answer I know of is to follow the "echo off" line with a "cls" line. The "echo off" is displayed, but it is erased so quickly it usually can't be noticed. This will usually suffice for all but the most "discriminating" nitpickers :-) :-) --- Michael J. Hoffman Voice: (407)255-8116 Manufacturing Engineering FAX: (407)255-8186 Encore Computer Corporation Email: mhoffman USnail: 100 N. Babcock St. UUCP: {uunet,codas!novavax,sun,pur-ee}!gould!mhoffman Melbourne, Fl 32935 "Curiouser and Curiouser" -- Alice in Wonderland
bobmon@iuvax.cs.indiana.edu (RAMontante) (06/06/89)
Oh well, for people who think that patching brain-damaged software is a Good Thing to Do, here are the batch-file patches I've used, with context. They've worked on MS-DOS v2.11 through v3.21, and might work on later versions. "Enjoy." p.s. Two separate patches are involved. I was told that my description of which patch fixes which batch file is backwards, but I can't remember whether I updated the descriptions or not. Usually both patches are desired anyway. Also, some miscellaneous patches and some notes are at the end. ____________________________________________ This file is basically an annotated script from a DEBUG session, plus some appended trivia. If you can't figure out how to use DEBUG this won't be very clear, but then it won't be much use either. For each patch, I start by searching for a target string (that's the "s" command). I unassemble the surrounding locations to be sure I have what I want ("u"), then I change the indicated byte ("e"). DOS Echo-Off Patches ~~~~~~~~~~~~~~~~~~~~ C:\MISC debug command.com - - -{ ECHO OFF default for AUTOEXEC.BAT } - -s cs:100 2000 00 bb 03 00 b4 48 cd 21 5BE4:122D - -u 122d 5BE4:122D 00BB0300 ADD [BP+DI+0003],BH { the } 5BE4:1231 B448 MOV AH,48 { search } 5BE4:1233 CD21 INT 21 { string } 5BE4:1235 7271 JB 12A8 5BE4:1237 A37B0B MOV [0B7B],AX 5BE4:123A C606D00B02 MOV BYTE PTR [0BD0],03 <-- change to 02 5BE4:123F 8EC0 MOV ES,AX ~~~~~~~~~~~~ 5BE4:1241 33FF XOR DI,DI 5BE4:1243 B000 MOV AL,00 5BE4:1245 AA STOSB 5BE4:1246 33C0 XOR AX,AX 5BE4:1248 AB STOSW 5BE4:1249 AB STOSW 5BE4:124A B8FFFF MOV AX,FFFF - -e 123e 5BE4:123E 03.02 { make the change } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ ECHO OFF default for } -{ alternate search: -scs:100 2000 81 c3 b8 00 } - -s cs:100 2000 24 01 50 e8 96 00 5BE4:1BBB - -u 1bb0 5BE4:1BB0 06 PUSH ES 5BE4:1BB1 E88C1A CALL 3640 5BE4:1BB4 E86AFF CALL 1B21 5BE4:1BB7 26 ES: 5BE4:1BB8 A0D00B MOV AL,[0BD0] 5BE4:1BBB 2401 AND AL,01 <-- change to 00 5BE4:1BBD 50 PUSH AX ~~~~~~~~~~~~ 5BE4:1BBE E89600 CALL 1C57 { search string ends here } 5BE4:1BC1 BEAB3D MOV SI,3DAB 5BE4:1BC4 E8D415 CALL 319B 5BE4:1BC7 8BD9 MOV BX,CX 5BE4:1BC9 81C3B800 ADD BX,00B8 { alternate search string } 5BE4:1BCD 51 PUSH CX 5BE4:1BCE B104 MOV CL,04 - -e 1bbc 5BE4:1BBC 01.00 { make the change } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { make CLS clear 25 lines of screen [it doesn't normally?] } - -u 2690 xxxx:2690 CD10 INT 10 xxxx:2692 B40F MOV AH,0F xxxx:2694 CD10 INT 10 xxxx:2696 8AD4 MOV DL,AH xxxx:2698 FECA DEC DL xxxx:269A B618 MOV DH,18 ^^-- originally 19 xxxx:269C 33C0 XOR AX,AX ~~~~~~~~~~~~~ xxxx:269E 8BC8 MOV CX,AX xxxx:26A0 BB0007 MOV BX,0700 xxxx:26A3 B406 MOV AH,06 xxxx:26A5 CD10 INT 10 xxxx:26A7 33D2 XOR DX,DX xxxx:26A9 B700 MOV BH,00 xxxx:26AB B402 MOV AH,02 xxxx:26AD CD10 INT 10 xxxx:26AF C3 RET - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { make ECHO[spacechar] give a blank line; [spacechar] is a single char. } - -u38e1 xxxx:38E1 C3 RET xxxx:38E2 8026zzzzFE AND BYTE PTR [zzzz],FE xxxx:38E7 C3 RET xxxx:38E8 E82000 CALL 390B <-- xxxx:38EB 7409 JZ 38F6 <-- xxxx:38ED BA8200 MOV DX,0082 xxxx:38F0 E8AAF1 CALL 2A9D xxxx:38F3 E949F1 JMP 2A3F xxxx:38F6 8E1Exxxx MOV DS,[xxxx] xxxx:38FA 8A1Ezzzz MOV BL,[zzzz] xxxx:38FE 0E PUSH CS xxxx:38FF 1F POP DS xxxx:3900 80E301 AND BL,01 - -q C:\MISC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - In above -- zzzz represents a constant value, here 0b9e unassemblies: xxxx represents miscellaneous values __________________________________________________________________________ version \AUTOEXEC.BAT other.BAT 25-line CLS echo<space> ~~~~~~~ ~~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ patches 01 -> 00 03 -> 02 19 -> 18 e8200074 -> 83f90172 Location Offsets (per John Wright etc.) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MSDOS 3.10 IBM/Compaq/generic 105B 1967 263B 3878 Zenith (early?) ?? 1987 ?? Zenith (IO.SYSv3.12) 112B 19C7 269B 38E8 * MSDOS 3.20 generic 115E 1ABC 3A18 Compaq 11A4 1B6C 3AC8 Zenith v3.21 ?? ?? ?? ** IBM (PCDOS 3.20) 115E 1B2C 3A88 PCDOS 3.30 (IBM) 1304 1B6C 3E29 -- * "echo ." is known to work for this version ** Patches work, but I don't remember the locations. Mea culpa. Also, "echo." works - RAM _____________________________________________________________________________ Notes: ~~~~~~ Date: Mon, 10 Nov 86 21:11:36 cst From: jai@im4u.UTEXAS.EDU (S. Jayashankar) Subject: COMMAND.COM Patch for Echo OFF Under DOS 3.1 I tried this patch on DOS 3.1. It works fine. However, the RENAME command is affected too: it doesn't accept a path name anymore for the first argument (it accepts only a file name in the current directory). When I restored my unpatched COMMAND.COM, it worked correctly. Has anyone else had the same problem? Jai. [ I use a `mv' program which is much nicer anyway, so I'm not affected. - RAM ] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Tom Reingold & Mike Brown suggest suggest patching location 0x1887; my > version of command.com shows the following evidence of an OEM patch there: - -u187c 4502:187C 2E CS: 4502:187D C7065648FFFF MOV WORD PTR [4856],FFFF 4502:1883 33C9 XOR CX,CX 4502:1885 EB10 JMP 1897 <-- Unconditional branch, 4502:1887 90 NOP <-- byte filler 4502:1888 E8D900 CALL 1964 4502:188B E80202 CALL 1A90 4502:188E F7064B0BFFFF TEST WORD PTR [0B4B],FFFF 4502:1894 75B2 JNZ 1848 4502:1896 C3 RET 4502:1897 E8F601 CALL 1A90 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
msschaa@cs.vu.nl (Schaap MS) (06/07/89)
In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes: >Does anyone know how to turn off echoing in a batch file without >showing the 'echo off?' @echo off Michael
shapiro@rb-dc1.UUCP (Mike Shapiro) (06/07/89)
In article <9139@boulder.Colorado.EDU> haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) writes: > >I put the command 'echo off' at the top of most of my batch files to >hide the following commands. However, 'echo off' is still displayed. > >Does anyone know how to turn off echoing in a batch file without >showing the 'echo off?' > For DOS 3.3 and above, just put a "@" before the echo off on the first line. For earlier DOS, here is the technique I learned several years ago to patch the COMMAND.COM file on any version of MS-DOS or PC-DOS to make the initial echo status for BAT files OFF. It is reproduced from memory and some quick experiments, so no guarantees, of course. 1. Make a copy of COMMAND.COM and work on it. >COPY COMMAND.COM COMX.COM 2. Run DEBUG and enter the commands shown. (Do not enter the commentary) >DEBUG COMX.COM -s 0,5fff 24 01 Find the byte sequence 24 01. xxxx:1B2B DEBUG replies with addresses it finds bytes. -u1b18 Disassemble starting with previous instruction: xxxx:1B28 A0FC0A MOV AL,[0AFC] xxxx:1B2B 2401 AND AL,01 ... -e1B2C 00 Patch the 01 byte to 00 -s 0,5fff fc 0a 03 Find the address in the above disassembled instruction followed by the byte 03 xxxx:115C -u115a To check, disassemble the instruction: xxxx:115A C606FC0A03 MOV BYTE PTR [0AFC],03 ... -e115e 02 Patch the 03 byte to 02 -w Write the modified file -q Quit (The above addresses are from PC-DOS 3.21. The "xxxx:" depends on your memory use at the time you run DEBUG.) 3. Do a binary comparison of the COMX.COM and original COMMAND.COM files. Only the two bytes should have changed, 03 to 02 and 01 to 00. To test it, on a floppy formatted with the /S option, replace COMMAND.COM with the COMX.COM, renaming it COMMAND.COM. Then reboot with the floppy. If all works well, rename COMMAND.COM to some other name such as COMMAND.COX and COMX.COM to COMMAND.COM in your normal boot directory (As I recall, the first patch indicates an "echo off" status during execution of a BAT file statement. The second patch selects "echo off" as the initial status for an AUTOEXEC.BAT file. It's been several years since I've done this, so I may be slightly wrong on the reasons.) Best of luck. -- Michael Shapiro, Encore Computer Corporation (formerly Gould/GSD) 15378 Avenue of Science, San Diego, CA 92128 (619)485-0910 UUCP: shapiro@rb-dc1 (This location will close, starting July 10. I will be moving on.)
mcwill@inmos.co.uk (Iain McWilliams) (06/12/89)
In article <3249@cps3xx.UUCP> usenet@cps3xx.UUCP (Usenet file owner) writes: >in article <9139@boulder.Colorado.EDU>, haverlan@tramp.Colorado.EDU (HAVERLAND MARC BRADLEY) says: [Request on how to hide "echo off" deleted] >> Marc Haverland >> haverlan@tramp.Colorado.EDU > >----> If you are using DOS 3.x, use @echo off. The @ sign will supress >the "echo off" message.... Couldn't resist nitpicking :-) I believe that this is only available on DOS 3.3 and greater. Iain. -- Iain McWilliams Inmos Ltd, Bristol | EMail(UK) ukc!inmos!mcwill ---------------------------------------| or mcwill@inmos.co.uk The opinions above are my personal | Internet: @col.hp.com:mcwill@inmos-c views and do not refelect Inmos policy.| UUCP:(US) uunet!inmos-c!mcwill