Category : Batch File Utilities - mostly for DOS
Archive   : VIDTYPE.ZIP
Filename : VIDTYPE.DOC

 
Output of file : VIDTYPE.DOC contained in archive : VIDTYPE.ZIP

The code herein is specific to the MS Quick C v2.5 compiler. However,
being ANSI compatible, I'm sure it could easily be tweaked for Turbo C or
what-have-you.

The program detects the video card type and sets an errorlevel so that you
can branch to label in batch file (and load a driver based on the video
card type).

a la:
=================================
@echo off
REM boot disk AUTOEXEC.BAT

vidtype
if errorlevel 8 goto win_VGA
if errorlevel 4 goto win_EGA
... |------------------ could test for errorlevel 7 -> 4
actually. All would be TRUE and
:END indicate and EGA adapter.

=================================


OVERVIEW:
-----------------------------------------------
ADAPTER TYPES ERRORLEVELS
================================ ===========
Monochrome Display Adapter (MDA) 1
Color Graphics Adapter (CGA) 2
Enhanced Graphics Adapter (EGA) 4
Video Graphics Array (VGA) 8
MultiColor Graphics Array (MCGA) 10
Hercules Graphics Card (HGC) 20
Video Adpater Unknown! (VAU) 0

Enjoy.