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.

105 lines
2.6 KiB

  1. @echo off
  2. @rem ======================================================================
  3. @rem ======================================================================
  4. @rem
  5. @rem Microsoft Windows
  6. @rem
  7. @rem Copyright (c) Microsoft Corporation, 1996 - 1997
  8. @rem
  9. @rem File: startchk.bat
  10. @rem
  11. @rem Contents: Microsoft PRS Signing Utilities
  12. @rem
  13. @rem History: 20-Aug-1997 pberkman created
  14. @rem
  15. @rem ======================================================================
  16. @rem ======================================================================
  17. @SETLOCAL ENABLEEXTENSIONS
  18. @set PATH=\CryptSDK\Bin;%PATH%
  19. @set __ECHOON=
  20. @set __INPUTFILE=list.txt
  21. @if "%COMPUTERNAME%" == "" @set COMPUTERNAME=TEST
  22. @rem ======================================================================
  23. @rem check command line
  24. @rem ======================================================================
  25. :CheckCmdLine
  26. @if "%1" == "" goto FindSubDirs
  27. @if /I "%1" == "-v" @set __ECHOON=TRUE
  28. @if /I "%1" == "/v" @set __ECHOON=TRUE
  29. @shift
  30. @goto CheckCmdLine
  31. @rem ======================================================================
  32. @rem find subdirs
  33. @rem ======================================================================
  34. :FindSubDirs
  35. @if "%__ECHOON%" == "TRUE" @echo on
  36. @dir /ad /b > "%COMPUTERNAME%.DIR"
  37. FOR /F %%i IN (%COMPUTERNAME%.DIR) DO call :DoCheckFiles %%i
  38. @goto end_startchk
  39. @rem ======================================================================
  40. @rem do the actual call
  41. @rem ======================================================================
  42. :DoCheckFiles
  43. @cd %1
  44. @if not exist "%__INPUTFILE%" @goto done_for
  45. prsparse "%__INPUTFILE%" "%COMPUTERNAME%.TXT"
  46. FOR /F "eol=; tokens=1* delims=," %%j IN (%COMPUTERNAME%.TXT) DO call :CheckFile %%j %%k
  47. :done_for
  48. @cd ..
  49. @goto end_startchk
  50. @rem ======================================================================
  51. @rem check each file
  52. @rem ======================================================================
  53. :CheckFile
  54. @chktrust %1
  55. @goto :EOF
  56. @rem ======================================================================
  57. @rem errors
  58. @rem ======================================================================
  59. :ErrNoFileToCheck
  60. @echo ERROR:
  61. @echo file to check not found ("%1"). FATAL!
  62. @goto :EOF
  63. :ErrNoListFile
  64. @echo ERROR:
  65. @echo no %__INPUTFILE% file found. FATAL!
  66. goto :EOF
  67. :end_startchk
  68. @ENDLOCAL