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.

66 lines
1.8 KiB

  1. @echo off
  2. setlocal ENABLEEXTENSIONS
  3. REM *****************************************************************
  4. REM
  5. REM Normal execution time for this script is half a second. If it
  6. REM takes longer than that, go to your \nt\tools\<Arch> directory
  7. REM and run "regsvr32 .\capicom.dll"
  8. REM
  9. REM Author: scoyne
  10. REM Date: 5/16/2002
  11. REM
  12. REM *****************************************************************
  13. set Attempt=1
  14. set GotLock=FALSE
  15. :TRY_AGAIN
  16. call :CRITICALSECTION 2> %TEMP%\signtest.lock
  17. if %GotLock% EQU FALSE (
  18. if %Attempt% LSS 5 (
  19. sleep 1
  20. set /a Attempt=%Attempt% + 1
  21. goto TRY_AGAIN
  22. )
  23. echo Unable to perform test signature at this time.
  24. goto EOF
  25. )
  26. if %SignTest% EQU FAILURE (
  27. echo ************************************************************
  28. echo You are unable to create a test signature. If this problem
  29. echo continues for more than 24 hours, please read the help
  30. echo document at http://winweb/wem/docs/BuildVerCerts.doc
  31. echo ************************************************************
  32. )
  33. del %TEMP%\signtest.lock >nul 2>&1
  34. goto :EOF
  35. :CRITICALSECTION
  36. echo Verifying your ability to create a test signature...
  37. set GotLock=TRUE
  38. REM Creating test file to sign:
  39. copy /y %RazzleToolPath%\signtest.cat %TEMP% 1>&2
  40. REM Test signing the cat file:
  41. signtool sign /q %SIGNTOOL_SIGN% %TEMP%\signtest.cat 1>&2
  42. if %ERRORLEVEL% EQU 0 (
  43. REM SUCCESS
  44. set SignTest=SUCCESS
  45. ) else (
  46. REM FAILURE
  47. set SignTest=FAILURE
  48. REM Repro the failure and show us the output this time
  49. copy /y %RazzleToolPath%\signtest.cat %TEMP% 1>&2
  50. signtool sign %SIGNTOOL_SIGN% %TEMP%\signtest.cat 2>&1
  51. )
  52. REM Delete the temporary cat file
  53. del %TEMP%\signtest.cat >nul 2>&1
  54. REM End Critical Section
  55. goto :EOF
  56. :EOF