Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for mcafee2.bat

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

  1. @ECHO OFF
  2. ECHO.
  3.  
  4. IF NOT [%1]==[] GOTO Syntax
  5. IF NOT "%OS%"=="Windows_NT" GOTO Syntax
  6.  
  7. SETLOCAL
  8. START /WAIT REGEDIT.EXE /E "%Temp%.\%~n0.reg" "HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx"
  9. IF NOT EXIST "%Temp%.\%~n0.reg" (
  10. 	ECHO McAfee registry keys not found
  11. 	ECHO.
  12. 	GOTO Syntax
  13. )
  14.  
  15. FOR /F "tokens=2 delims==" %%A IN ('TYPE "%Temp%.\%~n0.reg" ^| FIND "szEngineVer"')  DO SET McEngVer=%%~A
  16. FOR /F "tokens=2 delims==" %%A IN ('TYPE "%Temp%.\%~n0.reg" ^| FIND "szDatVersion"') DO SET McDatVer=%%~A
  17. FOR /F "tokens=2 delims==" %%A IN ('TYPE "%Temp%.\%~n0.reg" ^| FIND "szDatDate"')    DO SET McDatDate=%%~A
  18. DEL "%Temp%.\%~n0.reg"
  19.  
  20. ECHO McAfee scanning engine version  : %McEngVer%
  21. ECHO McAfee virus definition version : %McDatVer%
  22. ECHO McAfee virus definition date    : %McDatDate%
  23. ENDLOCAL
  24. GOTO End
  25.  
  26. :Syntax
  27. ECHO McAfee.bat,  Version 2.00 for Windows NT 4 / 2000 / XP
  28. ECHO Display McAfee VirusScan version information
  29. ECHO.
  30. ECHO Usage:  MCAFEE  [ /? ]
  31. ECHO.
  32. ECHO Written by Rob van der Woude
  33. ECHO http://www.robvanderwoude.com
  34.  
  35. :End
  36.  

page last uploaded: 2017-08-21, 14:26