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.

78 lines
2.1 KiB

  1. @echo off
  2. if "%1"=="-help" goto usage
  3. if "%1"=="-h" goto usage
  4. if "%1"=="/help" goto usage
  5. if "%1"=="/h" goto usage
  6. if "%1"=="-?" goto usage
  7. if "%1"=="/?" goto usage
  8. rem reset
  9. set parent_ca_machine=
  10. set ca_name=
  11. set req_file=
  12. rem check options
  13. if not "%1"=="" set ca_name=%1
  14. if "%1"=="" set ca_name=xt
  15. if not "%2"=="" set parent_ca_machine=%2
  16. if "%2"=="" set parent_ca_machine=xtan1
  17. if not "%3"=="" set req_file=%3
  18. if not "%3"=="" if not exist %req_file% goto req_not_found
  19. rem init
  20. set tu_list=tuallcfg tudef turekey turekc tureall tusub tuclt
  21. rem set skip flags
  22. for %%i in (%tu_list%) do set %%i_skip=
  23. for %%i in (%tu_list%) do if not exist %%i.tpl set %%i_skip=1
  24. rem now build answer files
  25. call tubuild.bat %ca_name% %parent_ca_machine%
  26. rem try an uninstall first to clean up
  27. call tuuninst.bat
  28. rem nusty way to link description & skip flag
  29. set tu_description=install a standalone root CA with all possible user defined configuration...
  30. set tu_skip=%tuallcfg_skip%
  31. call tuinst.bat tuallcfg
  32. set tu_description=install a standalone root CA with default configuration (except ca name)...
  33. set tu_skip=%tudef_skip%
  34. call tuinst.bat tudef
  35. set tu_description=install a CA with the existing key from previous install...
  36. set tu_skip=%turekey_skip%
  37. call tuinst.bat turekey
  38. set tu_description=install a CA with both existing key AND cert...
  39. set tu_skip=%turekc_skip%
  40. call tuinst.bat turekc
  41. set tu_description=install a CA with all existing key/cert/DB...
  42. set tu_skip=%tureall_skip%
  43. call tuinst.bat tureall
  44. set tu_description=install an online standalone subordinate CA
  45. set tu_skip=%tusub_skip%
  46. call tuinst.bat tusub
  47. set tu_description=install a CA Web Client...
  48. set tu_skip=%tuclt_skip%
  49. call tuinst.bat tuclt
  50. echo Done
  51. goto end
  52. :req_not_found
  53. echo.%req_file% request file doesn't exist.
  54. :usage
  55. echo.Usage: %0 CAName ParentCAMachine [Request File Name]
  56. :end
  57. set ca_name=
  58. set parent_ca_machine=
  59. set req_file=
  60. for %%i in (%tu_list%) do set %%i_skip=
  61. for %%i in (%tu_list%) do set %%i_desc=
  62. set tu_list=
  63. set tu_description=
  64. set tu_skip=