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.

120 lines
4.7 KiB

  1. @setlocal enableextensions
  2. @if not defined verbose @echo off
  3. rem Author: a-lloydj
  4. rem
  5. rem Purpose: This is the installation test for both upgrades and fresh installs
  6. rem
  7. rem %1 should be the build number that you intend to download
  8. rem %2 Optional switch to force no wait period only has one usable variation (override)
  9. rem %3 Optional switch used to edit txtsetup.sif files (edit) (a-donagu)
  10. rem 11/6/98 (antha)
  11. rem 1 modify clean.bat to not delete idw and mstools
  12. rem 2 release build installation to run as seperate process
  13. rem 3 modified bvt.ini
  14. rem set the targetdrive (clean installs only)
  15. rem wait 90 seconds after download before reboot
  16. rem 4 wait 30 seconds after build download starts and start symbols download
  17. rem %windir%\symbols for upgrades
  18. rem %tempdrive%\symbols for clean install
  19. if "%1"=="" goto ErrNoBuildNumber
  20. :Configure
  21. set copycmd=/y
  22. set LocationTools=c:\tools
  23. set ConfigurationFile=bvt.ini
  24. rem If we're in the safe build, assume a clean install. Otherwise, assume upgrade:
  25. echo.& echo Current system dir is %windir% | findstr /i safe
  26. IF errorlevel 1 (
  27. echo ... not the safe build, assuming upgrade
  28. set SetupType=upgrade
  29. ) ELSE (
  30. echo ... safe build, assuming clean install
  31. format d: /q <c:\tools\format.txt
  32. set SetupType=clean
  33. )
  34. echo.
  35. xcopy /r %LocationTools%\bvt.ini.%SetupType% %LocationTools%\%ConfigurationFile%
  36. if not exist %LocationTools%\%ConfigurationFile% goto ErrNoConfigurationFile
  37. if not defined Quality set Quality=bvt.qly
  38. if defined BVTID set Quality=bvt.qly
  39. set CheckGranularity=15
  40. set Language=usa
  41. set ReleasePoint=\\ntbuilds\release
  42. set BuildToDownload=%1
  43. rem Get previous information
  44. for /f "tokens=2 delims== " %%f in ('findstr OSType %LocationTools%\%ConfigurationFile%') do set OSType=%%f
  45. for /f "tokens=2 delims== " %%f in ('findstr BuildType %LocationTools%\%ConfigurationFile%') do set BuildType=%%f
  46. for /f "tokens=2 delims== " %%f in ('findstr TargetDrive %LocationTools%\%ConfigurationFile%') do set Targetdrive=%%f
  47. for /f "tokens=2 delims==" %%f in ('findstr OptionalSwitches %LocationTools%\%ConfigurationFile%') do set OptionalSwitches=%%f
  48. for /f "tokens=2 delims== " %%f in ('findstr DebuggerName %LocationTools%\%ConfigurationFile%') do set DebuggerName=%%f
  49. for /f "tokens=2 delims== " %%f in ('findstr StatusPoint %LocationTools%\%ConfigurationFile%') do set StatusPoint=%%f
  50. if /i "%2"=="Override" goto Download
  51. if /i "%3"=="Override" goto Download
  52. goto WaitingForQuality
  53. :WaitingForQuality
  54. rem if /i exist %ReleasePoint%\%Language%\%Quality%\%PROCESSOR_ARCHITECTURE%\%BuildToDownLoad%.bld goto Download
  55. if /i exist %ReleasePoint%\%Language%\%BuildToDownLoad%\%PROCESSOR_ARCHITECTURE%\%Quality% goto Download
  56. echotime /t Waiting for %BuildToDownLoad% to reach %Quality%...
  57. sleep %CheckGranularity%
  58. goto WaitingForQuality
  59. :DownLoad
  60. rem start /wait cmd /c clean 1
  61. rem start cmd /k "@echo Sending update to debugger %DebuggerName%&echo %ReleasePoint%\%Language%\%BuildToDownLoad%\%PROCESSOR_ARCHITECTURE%\%BuildType%.%OSType% > \\%DebuggerName%\%StatusPoint%\%computername%"
  62. if /i "%2"=="Edit" start sifeditor
  63. if /i "%3"=="Edit" start sifeditor
  64. if /i ""=="%TargetDrive%" (
  65. start %ReleasePoint%\%Language%\%BuildToDownLoad%\%PROCESSOR_ARCHITECTURE%\%BuildType%.%OSType%\winnt32\winnt32 %OptionalSwitches% /#8:%Language%\%BuildToDownLoad%\%PROCESSOR_ARCHITECTURE%\%BuildType%.%OSType% /#t
  66. sleep 30
  67. start getbld %BuildToDownLoad% %BuildType% %OSType% %windir% nobase
  68. ) else (
  69. start %ReleasePoint%\%Language%\%BuildToDownLoad%\%PROCESSOR_ARCHITECTURE%\%BuildType%.%OSType%\winnt32\winnt32 %OptionalSwitches% /tempdrive:%TargetDrive% /#8:%Language%\%BuildToDownLoad%\%PROCESSOR_ARCHITECTURE%\%BuildType%.%OSType% /#t
  70. sleep 30
  71. start getbld %BuildToDownLoad% %BuildType% %OSType% %TargetDrive% nobase
  72. )
  73. sleep 45
  74. echo "net use" > c:\netconnect.log
  75. net use >> c:\netconnect.log
  76. echo "" >> c:\netconnect.log
  77. netstat >> c:\netconnect.log
  78. goto End
  79. :ErrNoConfigurationFile
  80. echo .
  81. echo A configuration file is required at %LocationTools%\%ConfigurationFile% with the following
  82. echo information:
  83. echo [InstallTest]
  84. echo InstallationType=
  85. echo BuildType=fre|chk
  86. echo OSType=wks|srv
  87. echo OptionalSwitches={your choice of switches to use}
  88. echo DebuggerName={Name of your debugger}
  89. echo StatusPoint={share point on the debugger for putting machine state}
  90. echo .
  91. goto End
  92. :ErrNoBuildNumber
  93. echo .
  94. echo %0 needs a buildnumber to work
  95. echo .
  96. goto HlpMsg
  97. :HlpMsg
  98. echo .
  99. echo Script to download the build using quality identifiers of BVT or TST that are determined
  100. echo by the environment on the machine
  101. echo .
  102. echo Syntax %0: %0 Buildnum [Override]
  103. echo Buildnum -- this should be the build number that you wish to install (mandatory)
  104. echo Override -- overrides checking for build quality (optional)
  105. echo .
  106. :End