home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1990
/
02
/
info.bat
< prev
next >
Wrap
DOS Batch File
|
1989-08-31
|
4KB
|
154 lines
@ECHO OFF
REM -------- Display a nice boxed header for the info report
BATCHMAN CLS 1Eh
BATCHMAN WINDOW 1,1,80,3,1Ch,=
BATCHMAN SETCURSOR 2,23
BATCHMAN CECHO 1Ch,BATCHMAN'S SYSTEM INFO REPORT
BATCHMAN SETCURSOR 5,1
REM -------- Now let's have some info about memory
BATCHMAN CECHO C 1Eh,ROM BIOS date :
BATCHMAN ROMDATE
BATCHMAN CECHO C 1Eh,Main memory :
BATCHMAN MAINMEM R
BATCHMAN CECHO C 1Eh,exTENded memory :
BATCHMAN EXTMEM R
BATCHMAN CECHO C 1Eh,exPANded memory :
BATCHMAN EXPMEM R
REM -------- Display the DOS version
BATCHMAN CECHO C 1Eh,DOS version is :
BATCHMAN DOSVER
IF ERRORLEVEL 64 GOTO 2ormore
BATCHMAN CECHO 1Ch,less than 2.0
GOTO cpu
:2ormore
IF ERRORLEVEL 96 GOTO 3ormore
BATCHMAN CECHO 1Ch,2.x
GOTO cpu
:3ormore
IF ERRORLEVEL 128 GOTO 4ormore
BATCHMAN CECHO 1Ch,3.x
GOTO cpu
:4ormore
BATCHMAN CECHO 1Ch,at least 4.0
REM -------- Determine the CPU type
:cpu
BATCHMAN CECHO C 1Eh,CPU type :
BATCHMAN CPU
FOR %%v IN (0 1 2 3 4) DO IF ERRORLEVEL %%v GOTO cpu%%v
:CPU0
BATCHMAN CECHO 1Ch,unknown
GOTO break
:CPU1
BATCHMAN CECHO 1Ch,8086/8088
GOTO break
:CPU2
BATCHMAN CECHO 1Ch,80186
GOTO break
:cpu3
BATCHMAN CECHO 1Ch,80286
GOTO break
:cpu4
BATCHMAN CECHO 1Ch,80386
REM -------- Is ANSI loaded? Is BREAK on?
:break
BATCHMAN CECHO 1Eh,
BATCHMAN CECHO C 1Eh,BREAK :
BATCHMAN BREAK
IF ERRORLEVEL 1 GOTO breakon
BATCHMAN CECHO 1Ch,OFF
GOTO ansi
:breakon
BATCHMAN CECHO 1Ch,ON
:ansi
BATCHMAN CECHO C 1Eh,ANSI :
BATCHMAN ANSI
IF ERRORLEVEL 1 GOTO noansi
BATCHMAN CECHO 1Ch,loaded
GOTO drives
:noansi
BATCHMAN CECHO 1Ch,not loaded
:drives
REM -----
REM We use a FOR command and an auxiliary batch file to
REM list the available drives in the system.
REM -----
BATCHMAN CECHO 1Eh,
BATCHMAN CECHO 1Eh,The drive test takes a little time -- don't worry.
BATCHMAN CECHO C 1Eh,Drives :
FOR %%v IN (A B C D E F G H I J K L M) DO CALL DRIVINFO.BAT %%v
FOR %%v IN (N O P Q R S T U V W X Y Z) DO CALL DRIVINFO.BAT %%v
BATCHMAN CECHO 1Eh,
BATCHMAN CECHO 1Eh,
REM -------- Now let's get some info about your video.
BATCHMAN CECHO C 1Eh,Video adaptor :
BATCHMAN display
FOR %%v IN (1 2 3 4 5 6 7 8 9 10 11 12 13) DO IF errorlevel %%v GOTO vid%%v
:vid3
:vid9
:vid10
BATCHMAN CECHO 1Ch,Unknown
GOTO vidmode
:vid1
BATCHMAN CECHO 1Ch,Monochrome
GOTO vidmode
:vid2
BATCHMAN CECHO 1Ch,CGA
GOTO vidmode
:vid4
BATCHMAN CECHO 1Ch,EGA color
GOTO vidmode
:vid5
BATCHMAN CECHO 1Ch,EGA mono
GOTO vidmode
:vid6
BATCHMAN CECHO 1Ch,PGS
GOTO vidmode
:vid7
BATCHMAN CECHO 1Ch,VGA mono
GOTO vidmode
:vid8
BATCHMAN CECHO 1Ch,VGA color
GOTO vidmode
:vid11
BATCHMAN CECHO 1Ch,MCGA mono
GOTO vidmode
:vid12
BATCHMAN CECHO 1Ch,MCGA color
:vidmode
BATCHMAN CECHO C 1Eh,Video mode # :
BATCHMAN VIDEOMODE /R
BATCHMAN CECHO 1Eh,
BATCHMAN CECHO C 1Eh,Rows in display :
BATCHMAN ROWS /R
BATCHMAN CECHO 1Eh,
BATCHMAN CECHO C 1Eh,Cols in display :
BATCHMAN COLS /R
REM -----
REM Now we get fancy with the ending. First we hide the cursor,
REM then we set up a loop for 10 repetitions. In this loop,
REM we display "Press any key!" in a window of one color,
REM wait one second, and then display it in another color. If
REM the user presses a key, we bop out. Otherwise, the display
REM ends after 10 loops.
REM -----
BATCHMAN CURSORTYPE 32,32
BATCHMAN SETLOOP 10
:loop
BATCHMAN WINDOW 21,33,14,3,4Bh,=
BATCHMAN SETCURSOR 22,34
BATCHMAN CECHO C 4Bh,Press a key!
BATCHMAN BEEP 523,1
BATCHMAN WAITFOR 1
IF ERRORLEVEL 1 GOTO end
BATCHMAN WINDOW 21,33,14,3,3Ch,=
BATCHMAN SETCURSOR 22,34
BATCHMAN CECHO C 3Ch,Press a key!
BATCHMAN BEEP 392,1
BATCHMAN WAITFOR 1
IF ERRORLEVEL 1 GOTO end
BATCHMAN DECLOOP
IF ERRORLEVEL 1 GOTO loop
:end
BATCHMAN SETCURSOR 25,1
BATCHMAN CURSORTYPE