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.

86 lines
2.7 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM timebomb.cmd - JeremyD, VijeshS
  4. @REM Swap in the appropriate timebombed hive
  5. @REM
  6. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  7. @REM
  8. @REM -----------------------------------------------------------------
  9. @if defined _CPCMAGIC goto CPCBegin
  10. @perl -x "%~f0" %*
  11. @goto :EOF
  12. #!perl
  13. use strict;
  14. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  15. use lib $ENV{RAZZLETOOLPATH};
  16. use PbuildEnv;
  17. use ParseArgs;
  18. sub Usage { print<<USAGE; exit(1) }
  19. timebomb [-l <language>]
  20. Swap in the appropriate timebombed hive
  21. USAGE
  22. parseargs('?' => \&Usage);
  23. # *** TEMPLATE CODE ***
  24. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  25. __END__
  26. @:CPCBegin
  27. @set _CPCMAGIC=
  28. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  29. @if not defined DEBUG echo off
  30. @REM *** CMD SCRIPT BELOW ***
  31. REM International builds inherit setupreg.hiv and setupp.ini from the US release shares.
  32. REM They shouldn't need to rebuild them.
  33. if /i not "%lang%"=="usa" (
  34. call logmsg.cmd "%script_name% does not apply to international builds."
  35. goto :EOF
  36. )
  37. set DAYS=360
  38. if "%DAYS%" == "0" goto :EOF
  39. REM
  40. REM Swap timebomb versions of setupreg.hiv and the pid
  41. REM
  42. REM Set the first one to be workstation, which is the current directory
  43. set inflist= .
  44. perl %RazzleToolPath%\cksku.pm -t:per -l:%lang%
  45. if %errorlevel% EQU 0 set inflist=%inflist% perinf
  46. perl %RazzleToolPath%\cksku.pm -t:bla -l:%lang%
  47. if %errorlevel% EQU 0 set inflist=%inflist% blainf
  48. perl %RazzleToolPath%\cksku.pm -t:sbs -l:%lang%
  49. if %errorlevel% EQU 0 set inflist=%inflist% sbsinf
  50. perl %RazzleToolPath%\cksku.pm -t:srv -l:%lang%
  51. if %errorlevel% EQU 0 set inflist=%inflist% srvinf
  52. perl %RazzleToolPath%\cksku.pm -t:ads -l:%lang%
  53. if %errorlevel% EQU 0 set inflist=%inflist% entinf
  54. perl %RazzleToolPath%\cksku.pm -t:dtc -l:%lang%
  55. if %errorlevel% EQU 0 set inflist=%inflist% dtcinf
  56. for %%d in (%inflist%) do (
  57. REM Save non-timebombed hive
  58. if not exist %_NTPostBld%\%%d\idw\setup\no_tbomb.hiv (
  59. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\setupreg.hiv %_NTPostBld%\%%d\idw\setup\no_tbomb.hiv"
  60. )
  61. REM Copy in timebomb version of setupreg.hiv, but first save off original
  62. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\idw\setup\tbomb%DAYS%.hiv %_NTPostBld%\%%d\setupreg.hiv"
  63. REM Save non-timebombed setupp.ini
  64. if not exist %_NTPostBld%\%%d\idw\setup\setupp_no_tbomb.ini (
  65. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\setupp.ini %_NTPostBld%\%%d\idw\setup\setupp_no_tbomb.ini"
  66. )
  67. REM Copy in timebomb version of setupp.ini
  68. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\idw\setup\setupptb%DAYS%.ini %_NTPostBld%\%%d\setupp.ini"
  69. )