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.

435 lines
16 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM migwiz.cmd - JThaler, CalinN
  4. @REM This will call iexpress to generate a self-extracting CAB that
  5. @REM will be used when running our tool off the installation CD's
  6. @REM tools menu.
  7. @REM This also copies shfolder.dll into valueadd/msft/usmt
  8. @REM for use in our command line distribution
  9. @REM
  10. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  11. @REM
  12. @REM -----------------------------------------------------------------
  13. @if NOT defined HOST_PROCESSOR_ARCHITECTURE set HOST_PROCESSOR_ARCHITECTURE=%PROCESSOR_ARCHITECTURE%
  14. @if defined _CPCMAGIC goto CPCBegin
  15. @perl -x "%~f0" %*
  16. @goto :EOF
  17. #!perl
  18. use strict;
  19. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  20. use lib $ENV{RAZZLETOOLPATH};
  21. use PbuildEnv;
  22. use ParseArgs;
  23. sub Usage { print<<USAGE; exit(1) }
  24. migwiz.cmd [-l <language>]
  25. This is for the Files and Settings Transfer Wizard (aka Migration
  26. Wizard, or migwiz). It runs iexpress to generate a self-extracting
  27. CAB and install into support\tools.
  28. This will also copy shfolder.dll into valueadd\\msft\\usmt for
  29. distribution with the command line tool.
  30. USAGE
  31. parseargs('?' => \&Usage);
  32. # *** NEXT FEW LINES ARE TEMPLATE ***
  33. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  34. __END__
  35. :CPCBegin
  36. set _CPCMAGIC=
  37. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  38. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  39. REM
  40. REM x86 only!
  41. REM
  42. if not defined x86 goto end
  43. REM temporarily create the migwiz.exe.manifest file
  44. if exist %_NTPostBld%\migwiz.man (
  45. call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migwiz.man %_NTPostBld%\migwiz.exe.manifest"
  46. )
  47. set migpath=
  48. @REM
  49. @REM if the EXE already exists, we are probably in SP tree case,
  50. @REM where not all the files are available. We are going to need
  51. @REM to extract the files from the EXE and work from there.
  52. @REM
  53. if exist %_NTPostBld%\support\tools\fastwiz.exe goto SPScript
  54. set WorkingDir=%_NTPostBld%
  55. set SEDPath=%_NTPostBld%
  56. :common
  57. REM
  58. REM Use iexpress.exe to generate the self-extracting executable;
  59. REM
  60. set doubledpath=%WorkingDir:\=\\%
  61. REM
  62. REM build the CAB that is placed inside the exe
  63. REM
  64. REM first update the sed file with the proper binaries directory
  65. set migcab.sed=%temp%\migcab.sed
  66. perl -n -e "s/BINARIES_DIR/%doubledpath%/g;print $_;" < %SEDPath%\migcab.sed > %migcab.sed%
  67. REM Validate that the sed file exists
  68. if not exist %migcab.sed% (
  69. call errmsg.cmd "File %migcab.sed% not found."
  70. popd& goto end
  71. )
  72. REM Cleanup leftover CAB file if there
  73. if exist %WorkingDir%\migwiz.cab del /f %WorkingDir%\migwiz.cab
  74. REM
  75. REM Munge the path so we use the correct iexpress.exe to build the package with...
  76. REM NOTE: We *want* to use the one we just built (and for Intl localized)!
  77. REM
  78. set _NEW_PATH_TO_PREPEND=%RazzleToolPath%\%HOST_PROCESSOR_ARCHITECTURE%\loc\%LANG%
  79. set _OLD_PATH_BEFORE_PREPENDING=%PATH%
  80. set PATH=%_NEW_PATH_TO_PREPEND%;%PATH%
  81. REM call iexpress on the new sed
  82. call ExecuteCmd.cmd "start /min /wait iexpress.exe /M /N /Q %migcab.sed%"
  83. REM
  84. REM Return the path to what it was before...
  85. REM
  86. set PATH=%_OLD_PATH_BEFORE_PREPENDING%
  87. REM Validate that the CAB file exists
  88. if not exist %WorkingDir%\migwiz.cab (
  89. call errmsg.cmd "IExpress.exe failed on %migcab.sed%."
  90. popd& goto end
  91. )
  92. REM Delete the temporary sed file
  93. if exist %migcab.sed% del /f %migcab.sed%
  94. REM
  95. REM Now build the self-extracting EXE
  96. REM
  97. REM first update the sed file with the proper binaries directory
  98. set migwiz.sed=%temp%\migwiz.sed
  99. perl -n -e "s/BINARIES_DIR/%doubledpath%/g;print $_;" < %SEDPath%\migwiz.sed > %migwiz.sed%
  100. REM Validate that the sed file exists
  101. if not exist %migwiz.sed% (
  102. call errmsg.cmd "File %migwiz.sed% not found."
  103. popd& goto end
  104. )
  105. REM Cleanup leftover EXE file if there
  106. set outpath=%WorkingDir%\support\tools
  107. if exist %outpath%\fastwiz.exe del /f %outpath%\fastwiz.exe
  108. REM
  109. REM Munge the path so we use the correct iexpress.exe to build the package with...
  110. REM NOTE: We *want* to use the one we just built (and for Intl localized)!
  111. REM
  112. set _NEW_PATH_TO_PREPEND=%RazzleToolPath%\%HOST_PROCESSOR_ARCHITECTURE%\loc\%LANG%
  113. set _OLD_PATH_BEFORE_PREPENDING=%PATH%
  114. set PATH=%_NEW_PATH_TO_PREPEND%;%PATH%
  115. REM call iexpress on the new sed
  116. call ExecuteCmd.cmd "start /min /wait iexpress.exe /M /N /Q %migwiz.sed%"
  117. REM
  118. REM Return the path to what it was before...
  119. REM
  120. set PATH=%_OLD_PATH_BEFORE_PREPENDING%
  121. REM Validate that the EXE file exists
  122. if not exist %outpath%\fastwiz.exe (
  123. call errmsg.cmd "IExpress.exe failed on %migwiz.sed%."
  124. popd& goto end
  125. )
  126. popd
  127. REM Delete the temporary sed file
  128. if exist %migwiz.sed% del /f %migwiz.sed%
  129. REM Cleanup CAB file used to create the EXE
  130. if exist %WorkingDir%\migwiz.cab del /f %WorkingDir%\migwiz.cab
  131. REM
  132. REM Now copy shfolder.dll into the loadstate/scanstate distribution
  133. REM
  134. set shfolder.dll=%_NTPostBld%\shfolder.dll
  135. if not exist %shfolder.dll% (
  136. if not defined migpath (
  137. call errmsg.cmd "File %shfolder.dll% not found."
  138. goto end
  139. )
  140. ) else (
  141. if exist %_NTPostBld%\valueadd\msft\usmt\shfolder.dll del /f %_NTPostBld%\valueadd\msft\usmt\shfolder.dll
  142. call ExecuteCmd.cmd "xcopy /fd /Y %shfolder.dll% %_NTPostBld%\valueadd\msft\usmt\"
  143. )
  144. REM
  145. REM create the ansi subdirectory inside valueadd\msft\usmt
  146. REM
  147. set valueadd=%_NTPostBld%\valueadd\msft\usmt
  148. set ansidir=%valueadd%\ansi
  149. if exist %ansidir% rd /q /s %ansidir%
  150. call ExecuteCmd.cmd "md %ansidir%"
  151. call ExecuteCmd.cmd "xcopy /fd /i /Y %valueadd%\*.inf %ansidir%"
  152. if exist %valueadd%\iconlib.dll call ExecuteCmd.cmd "xcopy /fd /i /Y %valueadd%\iconlib.dll %ansidir%"
  153. if exist %valueadd%\log.dll call ExecuteCmd.cmd "xcopy /fd /i /Y %valueadd%\log.dll %ansidir%"
  154. if exist %valueadd%\shfolder.dllcall ExecuteCmd.cmd "xcopy /fd /i /Y %valueadd%\shfolder.dll %ansidir%"
  155. REM
  156. REM Hey guess what? I can't MOVE stuff, or it'll break PopulateFromVBL
  157. REM Either binplace to the final destination or use [x]copy
  158. REM
  159. if exist %valueadd%\scanstate_a.exe call ExecuteCmd.cmd "copy /Y %valueadd%\scanstate_a.exe %ansidir%\scanstate.exe"
  160. if exist %valueadd%\migism_a.dll call ExecuteCmd.cmd "copy /Y %valueadd%\migism_a.dll %ansidir%\migism.dll"
  161. if exist %valueadd%\script_a.dll call ExecuteCmd.cmd "copy /Y %valueadd%\script_a.dll %ansidir%\script.dll"
  162. if exist %valueadd%\sysmod_a.dll call ExecuteCmd.cmd "copy /Y %valueadd%\sysmod_a.dll %ansidir%\sysmod.dll"
  163. if exist %valueadd%\unctrn_a.dll call ExecuteCmd.cmd "copy /Y %valueadd%\unctrn_a.dll %ansidir%\unctrn.dll"
  164. goto end
  165. REM
  166. REM if the EXE already exists, we are probably in SP tree case,
  167. REM where not all the files are available. We are going to need
  168. REM to extract the files from the EXE and work from there.
  169. REM
  170. :SPScript
  171. REM Let's build two directories in the %temp%
  172. set migpath=%temp%\migpath
  173. REM Delete the migpath directory if it's there
  174. if exist %migpath% (
  175. call ExecuteCmd.cmd "rd /s /q %migpath%"
  176. )
  177. REM Create a new migpath directory
  178. call ExecuteCmd.cmd "md %migpath%"
  179. REM Verify that it's there
  180. if not exist %migpath% (
  181. call errmsg.cmd "Can't create directory %migpath%"
  182. goto end
  183. )
  184. REM Now extract all the files from the EXE in the migpath temporary directory
  185. call ExecuteCmd.cmd "start /min /wait %_NTPostBld%\support\tools\fastwiz.exe /Q /T:%migpath% /C"
  186. REM Now extract all the files from the CAB in the temporary directory
  187. REM
  188. REM Munge the path so we use the correct extract.exe to build the package with...
  189. REM NOTE: We *want* to use the one we just built (and for Intl localized)!
  190. REM
  191. set _NEW_PATH_TO_PREPEND=%RazzleToolPath%\%HOST_PROCESSOR_ARCHITECTURE%\loc\%LANG%
  192. set _OLD_PATH_BEFORE_PREPENDING=%PATH%
  193. set PATH=%_NEW_PATH_TO_PREPEND%;%PATH%
  194. REM call extract.exe
  195. call ExecuteCmd.cmd "start /min /wait extract.exe /L %migpath% %migpath%\migwiz.cab *.*"
  196. REM
  197. REM Return the path to what it was before...
  198. REM
  199. set PATH=%_OLD_PATH_BEFORE_PREPENDING%
  200. REM Now let's copy all the files that we have here on top of the extracted ones
  201. if exist %_NTPostBld%\usmtdef.inf call ExecuteCmd.cmd "copy /Y %_NTPostBld%\usmtdef.inf %migpath%"
  202. if exist %_NTPostBld%\guitrn.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\guitrn.dll %migpath%"
  203. if exist %_NTPostBld%\guitrn_a.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\guitrn_a.dll %migpath%"
  204. if exist %_NTPostBld%\iconlib.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\iconlib.dll %migpath%"
  205. if exist %_NTPostBld%\log.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\log.dll %migpath%"
  206. if exist %_NTPostBld%\migapp.inf call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migapp.inf %migpath%"
  207. if exist %_NTPostBld%\migism.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migism.dll %migpath%"
  208. if exist %_NTPostBld%\migism.inf call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migism.inf %migpath%"
  209. if exist %_NTPostBld%\migism_a.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migism_a.dll %migpath%"
  210. if exist %_NTPostBld%\migsys.inf call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migsys.inf %migpath%"
  211. if exist %_NTPostBld%\miguser.inf call ExecuteCmd.cmd "copy /Y %_NTPostBld%\miguser.inf %migpath%"
  212. if exist %_NTPostBld%\migwiz.exe call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migwiz.exe %migpath%"
  213. if exist %_NTPostBld%\migwiz.inf call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migwiz.inf %migpath%"
  214. if exist %_NTPostBld%\migwiz_a.exe call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migwiz_a.exe %migpath%"
  215. if exist %_NTPostBld%\script.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\script.dll %migpath%"
  216. if exist %_NTPostBld%\script_a.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\script_a.dll %migpath%"
  217. if exist %_NTPostBld%\shfolder.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\shfolder.dll %migpath%"
  218. if exist %_NTPostBld%\sysfiles.inf call ExecuteCmd.cmd "copy /Y %_NTPostBld%\sysfiles.inf %migpath%"
  219. if exist %_NTPostBld%\sysmod.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\sysmod.dll %migpath%"
  220. if exist %_NTPostBld%\sysmod_a.dll call ExecuteCmd.cmd "copy /Y %_NTPostBld%\sysmod_a.dll %migpath%"
  221. if exist %_NTPostBld%\migwiz.exe.manifest call ExecuteCmd.cmd "copy /Y %_NTPostBld%\migwiz.exe.manifest %migpath%"
  222. REM Next step. Let's recreate the CAB and the EXE files
  223. REM For this we are going to set the WorkingDir and go to the common label.
  224. set WorkingDir=%migpath%
  225. REM Also, we need to make sure that the SED files exist. If not, we are going to create them
  226. if exist %_NTPostBld%\migwiz.sed (
  227. if exist %_NTPostBld%\migcab.sed (
  228. set SEDPath=%_NTPostBld%
  229. goto common
  230. )
  231. )
  232. REM Yep, we must build them
  233. REM build migcab.sed
  234. ECHO [Version] 1>%migpath%\migcab.sed
  235. ECHO Class=IEXPRESS 1>>%migpath%\migcab.sed
  236. ECHO SEDVersion=3 1>>%migpath%\migcab.sed
  237. ECHO [Options] 1>>%migpath%\migcab.sed
  238. ECHO PackagePurpose=CreateCAB 1>>%migpath%\migcab.sed
  239. ECHO ShowInstallProgramWindow=0 1>>%migpath%\migcab.sed
  240. ECHO HideExtractAnimation=0 1>>%migpath%\migcab.sed
  241. ECHO UseLongFileName=1 1>>%migpath%\migcab.sed
  242. ECHO InsideCompressed=0 1>>%migpath%\migcab.sed
  243. ECHO CAB_FixedSize=0 1>>%migpath%\migcab.sed
  244. ECHO CAB_ResvCodeSigning=0 1>>%migpath%\migcab.sed
  245. ECHO RebootMode=I 1>>%migpath%\migcab.sed
  246. ECHO InstallPrompt=%%InstallPrompt%% 1>>%migpath%\migcab.sed
  247. ECHO DisplayLicense=%%DisplayLicense%% 1>>%migpath%\migcab.sed
  248. ECHO FinishMessage=%%FinishMessage%% 1>>%migpath%\migcab.sed
  249. ECHO TargetName=%%TargetName%% 1>>%migpath%\migcab.sed
  250. ECHO FriendlyName=%%FriendlyName%% 1>>%migpath%\migcab.sed
  251. ECHO AppLaunched=%%AppLaunched%% 1>>%migpath%\migcab.sed
  252. ECHO PostInstallCmd=%%PostInstallCmd%% 1>>%migpath%\migcab.sed
  253. ECHO AdminQuietInstCmd=%%AdminQuietInstCmd%% 1>>%migpath%\migcab.sed
  254. ECHO UserQuietInstCmd=%%UserQuietInstCmd%% 1>>%migpath%\migcab.sed
  255. ECHO SourceFiles=SourceFiles 1>>%migpath%\migcab.sed
  256. ECHO [Strings] 1>>%migpath%\migcab.sed
  257. ECHO InstallPrompt= 1>>%migpath%\migcab.sed
  258. ECHO DisplayLicense= 1>>%migpath%\migcab.sed
  259. ECHO FinishMessage= 1>>%migpath%\migcab.sed
  260. ECHO TargetName=BINARIES_DIR\migwiz.cab 1>>%migpath%\migcab.sed
  261. ECHO FriendlyName=IExpress Wizard 1>>%migpath%\migcab.sed
  262. ECHO AppLaunched= 1>>%migpath%\migcab.sed
  263. ECHO PostInstallCmd= 1>>%migpath%\migcab.sed
  264. ECHO AdminQuietInstCmd= 1>>%migpath%\migcab.sed
  265. ECHO UserQuietInstCmd= 1>>%migpath%\migcab.sed
  266. ECHO FILE0="usmtdef.inf" 1>>%migpath%\migcab.sed
  267. ECHO FILE1="guitrn.dll" 1>>%migpath%\migcab.sed
  268. ECHO FILE2="guitrn_a.dll" 1>>%migpath%\migcab.sed
  269. ECHO FILE3="iconlib.dll" 1>>%migpath%\migcab.sed
  270. ECHO FILE4="log.dll" 1>>%migpath%\migcab.sed
  271. ECHO FILE5="migapp.inf" 1>>%migpath%\migcab.sed
  272. ECHO FILE6="migism.dll" 1>>%migpath%\migcab.sed
  273. ECHO FILE7="migism.inf" 1>>%migpath%\migcab.sed
  274. ECHO FILE8="migism_a.dll" 1>>%migpath%\migcab.sed
  275. ECHO FILE9="migsys.inf" 1>>%migpath%\migcab.sed
  276. ECHO FILE10="miguser.inf" 1>>%migpath%\migcab.sed
  277. ECHO FILE11="migwiz.exe" 1>>%migpath%\migcab.sed
  278. ECHO FILE12="migwiz.inf" 1>>%migpath%\migcab.sed
  279. ECHO FILE13="migwiz_a.exe" 1>>%migpath%\migcab.sed
  280. ECHO FILE14="script.dll" 1>>%migpath%\migcab.sed
  281. ECHO FILE15="script_a.dll" 1>>%migpath%\migcab.sed
  282. ECHO FILE16="shfolder.dll" 1>>%migpath%\migcab.sed
  283. ECHO FILE17="sysfiles.inf" 1>>%migpath%\migcab.sed
  284. ECHO FILE18="sysmod.dll" 1>>%migpath%\migcab.sed
  285. ECHO FILE19="sysmod_a.dll" 1>>%migpath%\migcab.sed
  286. ECHO FILE20="migwiz.exe.manifest" 1>>%migpath%\migcab.sed
  287. ECHO [SourceFiles] 1>>%migpath%\migcab.sed
  288. ECHO SourceFiles0=BINARIES_DIR\ 1>>%migpath%\migcab.sed
  289. ECHO [SourceFiles0] 1>>%migpath%\migcab.sed
  290. ECHO %%FILE0%%= 1>>%migpath%\migcab.sed
  291. ECHO %%FILE1%%= 1>>%migpath%\migcab.sed
  292. ECHO %%FILE2%%= 1>>%migpath%\migcab.sed
  293. ECHO %%FILE3%%= 1>>%migpath%\migcab.sed
  294. ECHO %%FILE4%%= 1>>%migpath%\migcab.sed
  295. ECHO %%FILE5%%= 1>>%migpath%\migcab.sed
  296. ECHO %%FILE6%%= 1>>%migpath%\migcab.sed
  297. ECHO %%FILE7%%= 1>>%migpath%\migcab.sed
  298. ECHO %%FILE8%%= 1>>%migpath%\migcab.sed
  299. ECHO %%FILE9%%= 1>>%migpath%\migcab.sed
  300. ECHO %%FILE10%%= 1>>%migpath%\migcab.sed
  301. ECHO %%FILE11%%= 1>>%migpath%\migcab.sed
  302. ECHO %%FILE12%%= 1>>%migpath%\migcab.sed
  303. ECHO %%FILE13%%= 1>>%migpath%\migcab.sed
  304. ECHO %%FILE14%%= 1>>%migpath%\migcab.sed
  305. ECHO %%FILE15%%= 1>>%migpath%\migcab.sed
  306. ECHO %%FILE16%%= 1>>%migpath%\migcab.sed
  307. ECHO %%FILE17%%= 1>>%migpath%\migcab.sed
  308. ECHO %%FILE18%%= 1>>%migpath%\migcab.sed
  309. ECHO %%FILE19%%= 1>>%migpath%\migcab.sed
  310. ECHO %%FILE20%%= 1>>%migpath%\migcab.sed
  311. REM build migwiz.sed
  312. ECHO [Version] 1>%migpath%\migwiz.sed
  313. ECHO Class=IEXPRESS 1>>%migpath%\migwiz.sed
  314. ECHO SEDVersion=3 1>>%migpath%\migwiz.sed
  315. ECHO [Options] 1>>%migpath%\migwiz.sed
  316. ECHO PackagePurpose=InstallApp 1>>%migpath%\migwiz.sed
  317. ECHO ShowInstallProgramWindow=0 1>>%migpath%\migwiz.sed
  318. ECHO HideExtractAnimation=1 1>>%migpath%\migwiz.sed
  319. ECHO UseLongFileName=0 1>>%migpath%\migwiz.sed
  320. ECHO InsideCompressed=0 1>>%migpath%\migwiz.sed
  321. ECHO CAB_FixedSize=0 1>>%migpath%\migwiz.sed
  322. ECHO CAB_ResvCodeSigning=0 1>>%migpath%\migwiz.sed
  323. ECHO RebootMode=N 1>>%migpath%\migwiz.sed
  324. ECHO InstallPrompt=%%InstallPrompt%% 1>>%migpath%\migwiz.sed
  325. ECHO DisplayLicense=%%DisplayLicense%% 1>>%migpath%\migwiz.sed
  326. ECHO FinishMessage=%%FinishMessage%% 1>>%migpath%\migwiz.sed
  327. ECHO TargetName=%%TargetName%% 1>>%migpath%\migwiz.sed
  328. ECHO FriendlyName=%%FriendlyName%% 1>>%migpath%\migwiz.sed
  329. ECHO AppLaunched=%%AppLaunched%% 1>>%migpath%\migwiz.sed
  330. ECHO PostInstallCmd=%%PostInstallCmd%% 1>>%migpath%\migwiz.sed
  331. ECHO AdminQuietInstCmd=%%AdminQuietInstCmd%% 1>>%migpath%\migwiz.sed
  332. ECHO UserQuietInstCmd=%%UserQuietInstCmd%% 1>>%migpath%\migwiz.sed
  333. ECHO SourceFiles=SourceFiles 1>>%migpath%\migwiz.sed
  334. ECHO [Strings] 1>>%migpath%\migwiz.sed
  335. ECHO InstallPrompt= 1>>%migpath%\migwiz.sed
  336. ECHO DisplayLicense= 1>>%migpath%\migwiz.sed
  337. ECHO FinishMessage= 1>>%migpath%\migwiz.sed
  338. ECHO TargetName=BINARIES_DIR\support\tools\fastwiz.EXE 1>>%migpath%\migwiz.sed
  339. ECHO FriendlyName=Files and Settings Transfer Wizard 1>>%migpath%\migwiz.sed
  340. ECHO AppLaunched=migload.exe 1>>%migpath%\migwiz.sed
  341. ECHO PostInstallCmd="<None>" 1>>%migpath%\migwiz.sed
  342. ECHO AdminQuietInstCmd= 1>>%migpath%\migwiz.sed
  343. ECHO UserQuietInstCmd= 1>>%migpath%\migwiz.sed
  344. ECHO FILE0="migload.exe" 1>>%migpath%\migwiz.sed
  345. ECHO FILE1="migwiz.cab" 1>>%migpath%\migwiz.sed
  346. ECHO [SourceFiles] 1>>%migpath%\migwiz.sed
  347. ECHO SourceFiles0=BINARIES_DIR\ 1>>%migpath%\migwiz.sed
  348. ECHO [SourceFiles0] 1>>%migpath%\migwiz.sed
  349. ECHO %%FILE0%%= 1>>%migpath%\migwiz.sed
  350. ECHO %%FILE1%%= 1>>%migpath%\migwiz.sed
  351. set SEDPath=%migpath%
  352. goto common
  353. :end
  354. if exist %_NTPostBld%\migwiz.exe.manifest del /f %_NTPostBld%\migwiz.exe.manifest
  355. REM Delete the migpath directory if it's there. Also copy the fastwiz.exe to it's proper location
  356. if defined migpath (
  357. call ExecuteCmd.cmd "copy /Y %outpath%\fastwiz.exe %_NTPostBld%\support\tools\fastwiz.exe"
  358. call ExecuteCmd.cmd "rd /s /q %migpath%"
  359. )
  360. seterror.exe "%errors%"& goto :EOF