Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

  1. @echo off
  2. @if NOT defined HOST_PROCESSOR_ARCHITECTURE set HOST_PROCESSOR_ARCHITECTURE=%PROCESSOR_ARCHITECTURE%
  3. if defined _echo echo on
  4. if defined verbose echo on
  5. setlocal ENABLEEXTENSIONS
  6. REM -----------------------------------------------------------------------------------
  7. REM tagmsi - Script written by VijeshS
  8. REM -----------------------------------------------------------------------------------
  9. set ntverp=%_ntbindir%\public\sdk\inc\ntverp.h
  10. if not exist %ntverp% (
  11. call errmsg.cmd "File %ntverp% not found."
  12. goto errend
  13. )
  14. set bldno=
  15. for /f "tokens=6" %%i in ('findstr /c:"#define VER_PRODUCTBUILD " %ntverp%') do (
  16. set bldno=%%i
  17. )
  18. if "%bldno%" == "" (
  19. call errmsg.cmd "Unable to define bldno per %ntverp%"
  20. goto errend
  21. )
  22. set bldnomin=
  23. for /f "tokens=3" %%i in ('findstr /c:"#define VER_PRODUCTBUILD_QFE " %ntverp%') do (
  24. set bldnomin=%%i
  25. )
  26. if "%bldnomin%" == "" (
  27. call errmsg.cmd "Unable to define bldno per %ntverp%"
  28. goto errend
  29. )
  30. echo major %bldno% >> %1
  31. echo minor %bldnomin% >> %1
  32. rem end
  33. :errend