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.

88 lines
2.8 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM ADMigration.cmd
  5. REM Generates a new ADMigration.msi based on the compiled binaries
  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. ADMigration [-l <language>]
  21. Generates a new ADMigration.msi based on the compiled binaries
  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. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  30. REM ADDED BY v-pault
  31. REM Set the location of the tools I will use
  32. set TOOLPATH=%RazzleToolPath%
  33. REM ADDED BY v-pault
  34. REM Make directories
  35. set SUPPORTDIR=%_NTPostBld%\valueadd\MSFT\mgmt\ADMT
  36. if NOT EXIST %SUPPORTDIR% md %SUPPORTDIR%
  37. REM ADDED BY v-pault
  38. REM Removing any old cab file from the static msi file
  39. call logmsg.cmd /t "Removing any old cab file from the static msi file"
  40. REM call ExecuteCmd.cmd "cscript.exe %TOOLPATH%\WiStream.vbs %_NTPostBld%\dump\ADMigration.msi /D Cabs.w1.cab"
  41. call cscript.exe %TOOLPATH%\WiStream.vbs %_NTPostBld%\ADMigration.msi /D Cabs.w1.cab
  42. REM if errorlevel 1 (
  43. REM call errmsg.cmd "WiStream.vbs failed to remove current CAB from the msi."
  44. REM goto end
  45. REM )
  46. call cscript.exe %TOOLPATH%\WiStream.vbs %_NTPostBld%\ADMigration.msi /D Cabs.w1.CAB
  47. REM ADDED BY v-pault
  48. REM Placing the new binaries in a new cab file, and placing that cab in the msi file...
  49. call logmsg.cmd /t "Placing the new binaries in a new cab file, and placing that cab in the msi file..."
  50. call ExecuteCmd.cmd "cscript.exe %TOOLPATH%\WiMakADMTCab.vbs %_NTPostBld%\ADMigration.msi Cabs.w1 %_NTPostBld% /c /u /e"
  51. if errorlevel 1 (
  52. call errmsg.cmd "WiMakCab.vbs failed to make new CAB with built binaries."
  53. goto end
  54. )
  55. REM ADDED BY v-pault
  56. REM Fixing the file size and version info for the new msi file...
  57. call logmsg.cmd /t "Fixing the file size and version info for the new msi file..."
  58. call ExecuteCmd.cmd "msifiler -d %_NTPostBld%\ADMigration.msi"
  59. if errorlevel 1 (
  60. call errmsg.cmd "Msifiler failed to fix file size and version info."
  61. goto end
  62. )
  63. REM ADDED BY v-pault
  64. REM Copying my new msi file and other files to value add
  65. call logmsg.cmd /t "Copying my new msi file, and others, to value add"
  66. call ExecuteCmd.cmd "copy %_NTPostBld%\ADMigration.msi %SUPPORTDIR%\ADMigration.msi"
  67. call ExecuteCmd.cmd "copy %_NTPostBld%\ADMTReadme.doc %SUPPORTDIR%\ReadMe.doc"
  68. call ExecuteCmd.cmd "copy %_NTPostBld%\dump\PwdMig.exe %SUPPORTDIR%\PwdMig.exe"
  69. goto end
  70. :end
  71. REM remove temporary files created
  72. if exist cabs*.* del cabs*.*