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.

64 lines
1.8 KiB

  1. @echo off
  2. setlocal ENABLEEXTENSIONS
  3. if DEFINED _echo echo on
  4. if DEFINED verbose echo on
  5. set inf=
  6. REM ------------------------------------------------
  7. REM Get command-line options
  8. REM ------------------------------------------------
  9. for %%a in (./ .- .) do if ".%1." == "%%a?." goto Usage
  10. if "%1" == "" goto Usage
  11. set mydir=%1
  12. pushd %mydir%
  13. if NOT exist nt5inf.ca_ goto Usage
  14. expand nt5inf.ca_ nt5inf.cat >NUL
  15. if exist layout.inf call :update layout.inf&set inf=1
  16. if exist syssetup.inf call :update syssetup.inf&set inf=1
  17. if "%inf%"=="" goto Usage
  18. setreg -q 1 TRUE
  19. echo signing updated nt5inf.cat ...
  20. if defined SIGNTOOL_SIGN (
  21. signtool sign %SIGNTOOL_SIGN% "%mydir%\nt5inf.CAT"
  22. ) else (
  23. if not "%NT_CERTHASH%" == "" (
  24. signcode -sha1 %NT_CERTHASH% -n "Microsoft Windows NT Driver Catalog TEST" -i "http://ntbld" %mydir%\nt5inf.CAT
  25. ) else (
  26. signcode -v %RazzleToolPath%\driver.pvk -spc %RazzleToolPath%\driver.spc -n "Microsoft Windows NT Driver Catalog TEST" -i "http://ntbld" %mydir%\nt5inf.CAT
  27. )
  28. )
  29. del nt5inf.ca_
  30. goto end
  31. :update
  32. set file=%1
  33. echo updating nt5inf.cat with signature for new %file% ...
  34. updcat nt5inf.cat -a %file%
  35. goto :EOF
  36. :Usage
  37. echo IF you have either LAYOUT.INF or SYSSETUP.INF
  38. echo in your signing directory. Deltacat will not
  39. echo sign these files which must be signed in nt5inf.cat.
  40. echo.
  41. echo Let deltacat run then do the following:
  42. echo 1. Copy nt5inf.ca_ to your signing directory
  43. echo from wherever your are installing, e.g.
  44. echo \\ntbuilds\release\usa\latest.tst\x86\fre.wks,
  45. echo or, e.g. e:\i386.
  46. echo 2. Make sure you have the most recent updcat.exe
  47. echo 3. Run infsign [directory], e.g. infsign c:\bin
  48. echo.
  49. echo When complete, run winnt32 /m:[directory]
  50. popd
  51. :end
  52. @ENDLOCAL