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.

48 lines
1.8 KiB

  1. set SETUP_DRIVE=c:
  2. set BOOT_FILES=ntldr boot.ini ntdetect.com
  3. echo Backing up boot files and cleaning directories
  4. rd %SETUP_DRIVE%\bootback /q /s 1>NUL 2>NUL
  5. rd %SETUP_DRIVE%\$win_nt$.~BT /q /s 1>NUL 2>NUL
  6. rd %SETUP_DRIVE%\$win_nt$.~LS /q /s 1>NUL 2>NUL
  7. md %SETUP_DRIVE%\bootback
  8. for %%F in (%BOOT_FILES%) do attrib -r -s -h %SETUP_DRIVE%\%%F && copy %SETUP_DRIVE%\%%F %SETUP_DRIVE%\bootback\%%~nxF
  9. rd %IMAGE_DRIVE%\windows /q /s 1>NUL 2>NUL
  10. rd %IMAGE_DRIVE%\$win_nt$.~BT /q /s 1>NUL 2>NUL
  11. rd %IMAGE_DRIVE%\$win_nt$.~LS /q /s 1>NUL 2>NUL
  12. rd "%IMAGE_DRIVE%\documents and settings" /q /s 1>NUL 2>NUL
  13. rem
  14. rem create and populate new $win_nt$.~bt and $win_nt$.~ls
  15. rem
  16. echo Launching winnt32.exe
  17. \\ntdev\release\lab01\latest\x86fre\pro\i386\winnt32 /s:%SOURCE_1%\pro\amd64 /tempdrive:%SETUP_DRIVE% /noreboot /debug4:%IMAGE_DRIVE%\debug.log /MakeLocalSource:all
  18. rem
  19. rem copy the setup directories to the image drive
  20. rem
  21. echo Copying files to image drive
  22. xcopy /eiqhkyr %SETUP_DRIVE%\$win_nt$.~bt %IMAGE_DRIVE%\$win_nt$.~bt
  23. xcopy /eiqhkyr %SETUP_DRIVE%\$win_nt$.~ls %IMAGE_DRIVE%\$win_nt$.~ls
  24. for %%F in (%BOOT_FILES%) do attrib -r -s -h %IMAGE_DRIVE%\%%F && attrib -r -s -h %SETUP_DRIVE%\%%F && copy %SETUP_DRIVE%\%%F %IMAGE_DRIVE%\%%F && rem copy %SETUP_DRIVE%\bootback\%%F %SETUP_DRIVE%\%%F
  25. copy %SETUP_DRIVE%\txtsetup.sif %IMAGE_DRIVE%\txtsetup.sif
  26. copy %SETUP_DRIVE%\$LDR$ %IMAGE_DRIVE%\$LDR$
  27. rem
  28. rem restore the boot files on c:
  29. rem
  30. echo Restoring boot files
  31. copy %SETUP_DRIVE%\bootback\*.* %SETUP_DRIVE%\
  32. rem
  33. rem Remove migrate.inf, which contains drive letter mappings that will not
  34. rem be valid under the simulator
  35. rem
  36. erase %IMAGE_DRIVE%\$win_nt$.~bt\migrate.inf
  37. %BINDIR%\dskimage %IMAGE_DRIVE% %IMAGE_DRIVE%\$win_nt$.~bt\bootsect.dat /b