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.

149 lines
5.0 KiB

  1. @echo off
  2. REM clear vars so we have a known good starting point
  3. set INSTALLTYPE=
  4. set IISDEBUG=
  5. set Win95=
  6. rem set defaults
  7. set IISDEBUG=fre
  8. set INSTALLSERVER=\\iasbuild\k2
  9. set SYSTEMDIR=%windir%\system32
  10. set INETPUBDIR=%SystemDrive%\inetpub
  11. set SCRIPTDIR=%INETPUBDIR%\scripts
  12. if (%OS%) == () set OS=WIN95
  13. if (%OS%) == (WIN95) set SYSTEMDIR=%windir%\system
  14. REM if the user has chosen something like c:\os\windows to install win95 in, this will fail
  15. if (%OS%) == (WIN95) set INETPUBDIR=%winbootdir%\..\inetpub
  16. if (%OS%) == (WIN95) set SCRIPTDIR=%INETPUBDIR%\scripts
  17. if (%OS%) == (WIN95) set Win95=1
  18. REM Delete old copy of iisprobe.dll if it's there
  19. if exist %SYSTEMDIR%\iisprobe.dll del %SYSTEMDIR%\iisprobe.dll
  20. if exist %WINDIR%\iisprobe.dll del %WINDIR%\iisprobe.dll
  21. if (%PROCESSOR_ARCHITECTURE%) == () set PROCESSOR_ARCHITECTURE=x86
  22. if (%1) == (wks) set INSTALLTYPE=wks
  23. if (%1) == (WKS) set INSTALLTYPE=wks
  24. if (%1) == (srv) set INSTALLTYPE=srv
  25. if (%1) == (SRV) set INSTALLTYPE=srv
  26. if (%Win95%) == (1) set INSTALLTYPE=wks
  27. if (%INSTALLTYPE%) == () goto usage
  28. if (%3) == (fre) set IISDEBUG=fre
  29. if (%3) == (FRE) set IISDEBUG=fre
  30. if (%3) == (chk) set IISDEBUG=chk
  31. if (%3) == (CHK) set IISDEBUG=chk
  32. set UNATTENDED=
  33. if (%2) == () goto usage
  34. if (%4) == () goto Attended
  35. if NOT exist %4 goto FileNotThere
  36. set UNATTENDED=/u:%4
  37. :Attended
  38. goto %IISDEBUG%
  39. :chk
  40. if (%Win95%) == (1) goto Win95chk
  41. if NOT exist %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%chk\Winnt.%INSTALLTYPE%\setup.exe goto baddir
  42. goto pathOK
  43. :Win95chk
  44. if NOT exist %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%chk\Win.95\setup.exe goto baddir
  45. goto Win95pathOK
  46. :fre
  47. if (%Win95%) == (1) goto Win95fre
  48. if NOT exist %INSTALLSERVER%\%2\CDSetup\NTOPTPAK\En\%PROCESSOR_ARCHITECTURE%\Winnt.%INSTALLTYPE%\setup.exe goto baddir
  49. goto pathOK
  50. :Win95fre
  51. if NOT exist %INSTALLSERVER%\%2\CDSetup\NTOPTPAK\En\%PROCESSOR_ARCHITECTURE%\Win.95\setup.exe goto baddir
  52. goto Win95pathOK
  53. :pathOK
  54. md %INETPUBDIR% >NUL 2>>&1
  55. md %SCRIPTDIR% >NUL 2>>&1
  56. md %windir%\symbols > NUL 2>>&1
  57. %DBGPRINT% start "Copying K2 DBG Symbols" /min xcopy /verifd %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\symbols\*.dbg %windir%\symbols
  58. %DBGPRINT% start "Copying K2 PDB Symbols" /min xcopy /verifd %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\symbols\*.pdb %windir%\symbols
  59. echo updating inetdbg.dll and iisprobe.dll and mdutil.exe ...
  60. %DBGPRINT% copy %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\Dump\inetdbg.dll %SYSTEMDIR%
  61. %DBGPRINT% copy %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\Dump\iisprobe.dll %SCRIPTDIR%
  62. %DBGPRINT% copy %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\inetsrv\mdutil.exe %SYSTEMDIR%
  63. goto %IISDEBUG%OK
  64. :Win95pathOK
  65. md %INETPUBDIR%
  66. md %SCRIPTDIR%
  67. md %windir%\symbols
  68. %DBGPRINT% xcopy /e /r /i /f /d %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\symbols\*.dbg %windir%\symbols
  69. %DBGPRINT% xcopy /e /r /i /f /d %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\symbols\*.pdb %windir%\symbols
  70. %DBGPRINT% xcopy /e /r /i /f /d %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\symbols\sym\*.sym %windir%\symbols
  71. echo updating inetdbg.dll and iisprobe.dll and mdutil.exe ...
  72. %DBGPRINT% copy %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\Dump\inetdbg.dll %SYSTEMDIR%
  73. %DBGPRINT% copy %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\Dump\iisprobe.dll %SCRIPTDIR%
  74. %DBGPRINT% copy %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%%IISDEBUG%\inetsrv\mdutil.exe %SYSTEMDIR%
  75. if (%IISDEBUG%) == (fre) goto fre95OK
  76. if (%IISDEBUG%) == (chk) goto chk95OK
  77. :chkOK
  78. %DBGPRINT% start %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%CHK\Winnt.%INSTALLTYPE%\setup.exe %UNATTENDED%
  79. goto end
  80. :freOK
  81. %DBGPRINT% start %INSTALLSERVER%\%2\CDSetup\NTOPTPAK\En\%PROCESSOR_ARCHITECTURE%\Winnt.%INSTALLTYPE%\setup.exe %UNATTENDED%
  82. goto end
  83. :fre95OK
  84. %DBGPRINT% start %INSTALLSERVER%\%2\CDSetup\NTOPTPAK\En\%PROCESSOR_ARCHITECTURE%\Win.95\setup.exe %UNATTENDED%
  85. goto end
  86. :chk95OK
  87. %DBGPRINT% start %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%CHK\Win.95\setup.exe %UNATTENDED%
  88. goto end
  89. :baddir
  90. echo.
  91. if (%IISDEBUG%) == (fre) echo. Could not find %INSTALLSERVER%\%2\CDSetup\NTOPTPAK\En\%PROCESSOR_ARCHITECTURE%\Winnt.%INSTALLTYPE%\setup.exe!
  92. if (%IISDEBUG%) == (chk) echo. Could not find %INSTALLSERVER%\%2\%PROCESSOR_ARCHITECTURE%chk\Winnt.%INSTALLTYPE%\setup.exe!
  93. echo.
  94. goto usage
  95. :FileNotThere
  96. echo.
  97. echo You specified an unattended setup file (%4) that does not exist.
  98. echo.
  99. :usage
  100. echo.
  101. echo usage: %0 [wks,srv] buildnum [fre,chk] [unattend.txt file]
  102. echo.
  103. echo example (installs fre build): %0 srv 0480
  104. echo example (installs chk build): %0 srv 0480 chk
  105. echo example (installs fre build unattended): %0 srv 0480 fre c:\temp\unattend.txt
  106. echo example (installs chk build unattended): %0 srv 0480 chk c:\temp\unattend.txt
  107. echo.
  108. echo if you would like to see what %0 is going to do,
  109. echo run 'set DBGPRINT=echo' before you run %0.
  110. echo if you choose to do this, you will then have to run
  111. echo 'set DBGPRINT=' for %0 to actually echo install K2.
  112. echo.
  113. :end
  114. set INSTALLTYPE=
  115. set IISDEBUG=
  116. set INSTALLSERVER=
  117. set Win95=