Leaked source code of windows server 2003
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.

54 lines
1.4 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 prodno=
  15. for /f "tokens=3" %%i in ('findstr /c:"#define VER_PRODUCTMAJORVERSION " %ntverp%') do (
  16. set prodno=%%i
  17. )
  18. set prodnomin=
  19. for /f "tokens=3" %%i in ('findstr /c:"#define VER_PRODUCTMINORVERSION " %ntverp%') do (
  20. set prodnomin=%%i
  21. )
  22. set bldno=
  23. for /f "tokens=6" %%i in ('findstr /c:"#define VER_PRODUCTBUILD " %ntverp%') do (
  24. set bldno=%%i
  25. )
  26. if "%bldno%" == "" (
  27. call errmsg.cmd "Unable to define bldno per %ntverp%"
  28. goto errend
  29. )
  30. set bldnomin=
  31. for /f "tokens=3" %%i in ('findstr /c:"#define VER_PRODUCTBUILD_QFE " %ntverp%') do (
  32. set bldnomin=%%i
  33. )
  34. if "%bldnomin%" == "" (
  35. call errmsg.cmd "Unable to define bldno per %ntverp%"
  36. goto errend
  37. )
  38. echo prodnomajor %prodno% >> %1
  39. echo prodnominor %prodnomin% >> %1
  40. echo major %bldno% >> %1
  41. echo minor %bldnomin% >> %1
  42. rem end
  43. :errend