🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #26227

Bat file using ESC seq needs to find if DEVICE=ANSI.SYS was set

#26227
From: Jay G. Heiser
Date: Wed, 06 Apr 1988 15:07
29 lines
2073 bytes
I've recently written an intall batch file that any of the users supported
by my info center can use to install MSKERM.EXE & the appropriate init file
in a KERMIT directory and install a batch file to run it.

Getting ambitious. I took advantage of the colors, modes, & cursor posi-
tioning made possible with the ANSI.SYS device driver.  Unfortunately,
many of the PCs not under my control do not have their CONFIG.SYS files
properly set up to use ANSI.  Since I've tried to make install.bat as
bullet proof as possible, I need a way to test before using any ESC seq-
uences whether or not the driver has been set.  How can I do that?

	1) Best would be a utility that checks to see if the driver has
been invoked & returns the appropriate error code.  I can get this written
in ASM if someone can tell me how to find the existence of the driver in
memory (this isn't an unusual request, such a util must exist already.)
	2) I could test for the existence of the string 'ANSI.SYS' in
CONFIG.SYS.  In most cases, this would be adequite.  Unfortunately, FIND
doesn't return an errorlevel.  Turbo-C GREP doesn't either.  Anyone know of
a way to test for the existence of a string in a file?
	3)BTW DEVICE isn't an environmental variable, so echo %device% won't
work.  Also, the ANSI driver can be started ONLY through CONFIG.SYS, so I
can't carry it around on the disk containing install.bat unless I use that
as the boot disk.

Any Suggestions?    Thank you,

-- 
Jay Heiser                   UUCP: ..!umd5!vrdxhq!ms3!msicv01
                             ARPA: msicv01@hios-pent.arpa
Technical Details
Message-ID: <767@ms3.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!uwvax!oddjob!mimsy!eneevax!umd5!vrdxhq!ms3!msicv01

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!uwvax!oddjob!mimsy!eneevax!umd5!vrdxhq!ms3!msicv01
From: msicv01@ms3.UUCP (Jay G. Heiser)
Newsgroups: comp.sys.ibm.pc
Subject: Bat file using ESC seq needs to find if DEVICE=ANSI.SYS was set
Message-ID: <767@ms3.UUCP>
Date: 6 Apr 88 15:07:37 GMT
Organization: Automation Management Consultants, Inc., Arl. VA
Lines: 29
Keywords: ansi.sys, Escape Sequences, errorlevel, find, grep, DOS, unix
Summary: MS-DOS isn't unix