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.

65 lines
2.0 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM timebomb.cmd
  5. REM Swap in the appropriate timebombed hive
  6. REM
  7. REM Copyright (c) Microsoft Corporation. All rights reserved.
  8. REM
  9. REM ------------------------------------------------------------------
  10. if defined _CPCMAGIC goto CPCBegin
  11. perl -x "%~f0" %*
  12. goto :EOF
  13. #!perl
  14. use strict;
  15. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  16. use lib $ENV{RAZZLETOOLPATH};
  17. use PbuildEnv;
  18. use ParseArgs;
  19. sub Usage { print<<USAGE; exit(1) }
  20. timebomb [-l <language>]
  21. Swap in the appropriate timebombed hive
  22. USAGE
  23. parseargs('?' => \&Usage);
  24. # *** NEXT FEW LINES ARE TEMPLATE ***
  25. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  26. __END__
  27. :CPCBegin
  28. set _CPCMAGIC=
  29. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  30. REM *** BEGIN YOUR 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=180
  38. if "%DAYS%" == "0" goto :EOF
  39. REM
  40. REM Swap timebomb versions of setupreg.hiv and the pid
  41. REM
  42. for %%d in (. perinf srvinf blainf sbsinf entinf dtcinf) do (
  43. REM Save non-timebombed hive
  44. if not exist %_NTPostBld%\%%d\idw\setup\no_tbomb.hiv (
  45. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\setupreg.hiv %_NTPostBld%\%%d\idw\setup\no_tbomb.hiv"
  46. )
  47. REM Copy in timebomb version of setupreg.hiv, but first save off original
  48. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\idw\setup\tbomb%DAYS%.hiv %_NTPostBld%\%%d\setupreg.hiv"
  49. REM Save non-timebombed setupp.ini
  50. if not exist %_NTPostBld%\%%d\idw\setup\setupp_no_tbomb.ini (
  51. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\setupp.ini %_NTPostBld%\%%d\idw\setup\setupp_no_tbomb.ini"
  52. )
  53. REM Copy in timebomb version of setupp.ini
  54. call ExecuteCmd.cmd "copy /b %_NTPostBld%\%%d\idw\setup\setupptb%DAYS%.ini %_NTPostBld%\%%d\setupp.ini"
  55. )