Article View: comp.os.msdos.programmer
Article #984Re: A batch programming contest for you
From: Yossi Gil
Date: Wed, 19 Aug 1992 06:51
Date: Wed, 19 Aug 1992 06:51
44 lines
2094 bytes
2094 bytes
ts@uwasa.fi (Timo Salmi) writes:
>As you might know I have a large collection of batch files and
>tricks garbo.uwasa.fi:/pc/ts/tsbat36.zip. I am always looking for
>useful new information for it.
Well, I have this other discovery that I try to offer every year
or so, but it still remains unnoticed. I hope that you will add
this to your tips&tricks so that I will not have to pound on this
again in a year from now.
How to prevent ctrl-breaks during execution of autoexec.bat?
------------------------------------------------------------
The "ctty nul" command is a well known trick, but it doesn't hold
if the user types in ^C quickly. One usually puts "@echo off" at the
beginning of the batch file. These leavs even more time to the
intruding user to break.
My trick is to create
shell=command.com /p nul line in my config.sys file. This will
make command.com start with the nul device as its standard
input/output. It is undocumented, but worked in all of the many dos
versions I have tried it on.
And yet another relatively unknwon features of COMMAND.COM. Did you
know that the following would work? Can you figure out what it will
do?
<NUL> con ver
as well as
<CON> nul vol
not mentioning
if not if == not shift else ; endif
These may prove useful to encrypt your batch files.
--
Joseph (Yossi) Gil {alberta,uw-beaver,uunet}!ubc-cs!yogi
Dept. of Computer Science yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
6356 Agricultural Road., Univ. of B.C., Tel: +1-604-822-8175
Vancouver, British Columbia, V6T 1Z2, Canada. Fax: +1-604-822-5485
Technical Details
Message-ID:
<1992Aug19.065119.10003@cs.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!yogiReferences:
<1992Aug18.052017.3758@uwasa.fi>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!yogi From: yogi@cs.ubc.ca (Yossi Gil) Subject: Re: A batch programming contest for you Message-ID: <1992Aug19.065119.10003@cs.ubc.ca> Sender: usenet@cs.ubc.ca (Usenet News) Organization: Computer Science, University of B.C., Vancouver, B.C., Canada References: <1992Aug18.052017.3758@uwasa.fi> Date: Wed, 19 Aug 92 06:51:19 GMT Lines: 44