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.

33 lines
744 B

  1. @echo off
  2. setlocal
  3. REM
  4. REM this script will get the build number from ntverp.h
  5. REM
  6. set ntverp=%_NTBINDIR%\public\sdk\inc\ntverp.h
  7. if NOT EXIST %ntverp% (echo Can't find ntverp.h.&goto :ErrEnd)
  8. for /f "tokens=6" %%i in ('findstr /c:"#define VER_PRODUCTBUILD " %ntverp%') do echo %%i
  9. if /I /%1/ == // goto :End
  10. set buildname=%_NTTREE%\BUILD_LOGS\buildname.txt
  11. for %%. in (%buildname%) do (
  12. pushd %%~dp. 1>NUL 2>NUL
  13. if errorlevel 1 echo Failed to open %buildname% &goto :ErrEnd
  14. if NOT EXIST %%~nx. echo Failed to open %buildname% & goto :ErrEnd
  15. for /F %%_ in (%buildname%) do echo %%_
  16. popd
  17. )
  18. goto :End
  19. :ErrEnd
  20. echo Quitting with errors
  21. goto :End
  22. :End
  23. endlocal
  24. goto :EOF