Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for biosdate.bat

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

  1. @ECHO OFF
  2. IF NOT "%OS%"=="Windows_NT" GOTO Syntax
  3. IF NOT [%1]==[] GOTO Syntax
  4.  
  5. :: Create temporary debug script
  6. >  "%Temp%.\biosdate.dbg" ECHO D FFFF:0005 L 8
  7. >> "%Temp%.\biosdate.dbg" ECHO Q
  8.  
  9. :: Use temporary debug script to retrieve BIOS date
  10. FOR /F "tokens=9" %%A IN ('DEBUG ^< "%Temp%.\biosdate.dbg" ^| FIND "/"') DO SET BIOSDate=%%A
  11.  
  12. :: Remove temporary debug script
  13. DEL "%Temp%.\biosdate.dbg"
  14.  
  15. :: Diplay result
  16. SET BIOSDate
  17.  
  18. :: Done
  19. GOTO:EOF
  20.  
  21.  
  22. :Syntax
  23. ECHO.
  24. ECHO BIOSDate.cmd,  Version 1.00 for Windows NT 4 / 2000 / XP
  25. ECHO Displays the BIOS date for the local computer
  26. ECHO.
  27. ECHO Usage:  BIOSDATE
  28. ECHO.
  29. ECHO Written by Rob van der Woude
  30. ECHO http://www.robvanderwoude.com
  31. ECHO.
  32. ECHO Original idea by ComputerHope
  33. ECHO http://www.computerhope.com/rdebug.htm
  34.  

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