Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for hardware.bat

(view source code of hardware.bat as plain text)

  1. @ECHO OFF
  2. REM No command line parameters required
  3. IF NOT [%1]==[] GOTO Syntax
  4.  
  5. REM Check if BATCHMAN.COM is available
  6. BATCHMAN MONTH
  7. IF NOT ERRORLEVEL 1 GOTO Syntax
  8.  
  9. REM Check for valid DOS versions
  10. BATCHMAN DOSVER
  11. IF NOT ERRORLEVEL  96 GOTO Syntax
  12. IF     ERRORLEVEL 130 GOTO Syntax
  13.  
  14. REM Query CPU type
  15. SET CPU=
  16. BATCHMAN CPU
  17. IF ERRORLEVEL 1 SET CPU=8086
  18. IF ERRORLEVEL 2 SET CPU=80286
  19. IF ERRORLEVEL 3 SET CPU=80386
  20. IF ERRORLEVEL 4 SET CPU=80486 or better
  21. ECHO CPU type: %CPU%
  22. SET CPU=
  23.  
  24. REM Query BIOS date
  25. BATCHMAN CECHO BIOS date:
  26. BATCHMAN ROMDATE
  27.  
  28. REM Show disk summary and available base memory
  29. CHKDSK /V
  30.  
  31. REM Show available extended memory
  32. BATCHMAN CECHO Extended memory (XMS):
  33. BATCHMAN EXTMEM R
  34.  
  35. REM Show available expanded memory
  36. BATCHMAN CECHO Expanded memory (EMS):
  37. BATCHMAN EXPMEM R
  38.  
  39. REM Query video (text) mode
  40. SET VID=
  41. BATCHMAN VIDEOMODE
  42. IF ERRORLEVEL  1 SET VID=MDA
  43. IF ERRORLEVEL  2 SET VID=CGA
  44. IF ERRORLEVEL  4 SET VID=EGA color
  45. IF ERRORLEVEL  5 SET VID=EGA mono
  46. IF ERRORLEVEL  6 SET VID=PGS
  47. IF ERRORLEVEL  7 SET VID=VGA mono
  48. IF ERRORLEVEL  8 SET VID=VGA color
  49. IF ERRORLEVEL 11 SET VID=MCGA mono
  50. IF ERRORLEVEL 12 SET VID=MCGA color
  51. ECHO Video mode: %VID%
  52. SET VID=
  53.  
  54. GOTO End
  55.  
  56. :Syntax
  57. ECHO.
  58. ECHO Hardware.bat,  Version 1.00 for MS-DOS 3.0 .. 4.01
  59. ECHO Display a hardware summary
  60. ECHO.
  61. ECHO Usage:  HARDWARE
  62. ECHO.
  63. ECHO This batch file requires BATCHMAN.COM by Michael Mefford
  64. ECHO.
  65. ECHO Written by Rob van der Woude
  66. ECHO http://www.robvanderwoude.com
  67.  
  68. :End
  69.  

page last modified: 2024-04-16; loaded in 0.0078 seconds