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.

104 lines
2.4 KiB

  1. @ECHO OFF
  2. REM -----------------------------------------------------------------------------
  3. REM This batch file is used to copy all ADMT-related symbol files to a directory.
  4. REM -----------------------------------------------------------------------------
  5. SET CommandName=%0%
  6. REM Help
  7. IF "%1%"=="/?" GOTO ERROR_HELP
  8. REM
  9. REM Exactly two arguments
  10. REM
  11. IF "%1%"=="" (
  12. ECHO Must have the SourcePath argument.
  13. GOTO ERROR_ARGS
  14. )
  15. SET SourcePath=%1%
  16. SHIFT
  17. IF "%1%"=="" (
  18. ECHO Must have the TargetPath argument.
  19. GOTO ERROR_ARGS
  20. )
  21. SET TargetPath=%1%
  22. SHIFT
  23. IF NOT "%1%"=="" (
  24. ECHO There are more than two command line arguments.
  25. GOTO ERROR_ARGS
  26. )
  27. REM
  28. REM Create and check source and target directories
  29. REM
  30. IF NOT EXIST %SourcePath% (
  31. ECHO %SourcePath% does not exist.
  32. GOTO EXIT
  33. )
  34. IF NOT EXIST %TargetPath% (
  35. MD %TargetPath%
  36. IF ERRORLEVEL 1 (
  37. ECHO %TargetPath% is not accessible.
  38. GOTO EXIT
  39. )
  40. )
  41. REM
  42. REM Copy files
  43. REM
  44. FOR %%i in (ADMT ADMTAgnt ADMTAgntNT4 DCTAgentService DCTAgentServiceNT4 McsDispatcher) DO (
  45. ECHO Copying %%i.pdb ...
  46. COPY %SourcePath%\exe\%%i.pdb %TargetPath%\%%i.pdb > NULL
  47. if errorlevel 1 (
  48. ECHO Unable to copy symbol file %%i.pdb from %SourcePath%\exe to %TargetPath%
  49. GOTO EXIT
  50. )
  51. )
  52. FOR %%i in (AddToGroup ADMTScript DBManager DisableTargetAccount DomMigSI GetRids McsADsClassProp McsDctWorkerObjects McsDctWorkerObjectsNT4 McsMigrationDriver MCSNetObjectEnum McsPISag McsPISagNT4 McsVarSetMin McsVarSetMinNT4 MoveObj MsPwdMig ScmMigr SetTargetPassword TrustMgr UpdateDB UpdateMOT UPNUpdt wizards) DO (
  53. ECHO Copying %%i.pdb ...
  54. COPY %SourcePath%\dll\%%i.pdb %TargetPath%\%%i.pdb > NULL
  55. if errorlevel 1 (
  56. ECHO Unable to copy symbol file %%i.pdb from %SourcePath%\dll to %TargetPath%
  57. GOTO EXIT
  58. )
  59. )
  60. ECHO All symbol files copied.
  61. GOTO EXIT
  62. REM
  63. REM Arguments are invalid.
  64. REM
  65. :ERROR_ARGS
  66. ECHO Invalid arguments!
  67. GOTO ERROR_HELP
  68. REM
  69. REM Print out the help message.
  70. REM
  71. :ERROR_HELP
  72. ECHO Usage: %CommandName% SourcePath TargetPath
  73. ECHO SourcePath: source symbol file directory
  74. ECHO TargetPath: target symbol file directory
  75. ECHO %CommandName% copies ADMT-related symbol files from dll and exe
  76. ECHO subdirectories of SourcePath to TargetPath.
  77. GOTO EXIT
  78. :EXIT
  79. REM End of the batch file