Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Операционные системы » Microsoft Windows » Windows Preinstallation Environment(WinPE) и BartPE LiveCD 6

Модерирует : KLASS, IFkO

vu1tur (12-04-2010 11:01): http://forum.ru-board.com/topic.cgi?forum=62&topic=20418  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

yurkesha



Silver Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору

Код:
@echo off
title BartPE USB Installer v2.0.0
echo.
echo BartPE USB Installer v2.0.0
echo Copyright (c) 2005 Bart Lagerweij. All rights reserved.
echo This program is free software. Use and/or distribute it under
echo the terms of the Nu2 License.
echo Modified by (Y)urkesha for using with USB HDD bootsector
echo.
setlocal
set _format=
set _target=
set "_base=%~dp0"
if /i "%1" == "-f" set "_format=1"& shift
set "_target=%~d1"
if "%_target%" == "" (
  echo Usage pe2usb [-f] ^<drive:^>
  echo.
  echo Where:
  echo     ^<drive:^> The drive letter of your USB flash drive
  echo     -f       Format USB drive and install patched bootsector
  echo              ^(this is only needed the first time^)
  goto _err)
echo USB target drive set to "%_target%"
echo Checking drive "%_target%"
if not exist %_target%\nul (
  echo Error: Drive "%_target%" does not exist!
  goto _err)
if "%_target%" == "%SystemDrive%" (
  echo Error: Trying to install to your SystemDrive?!?
  goto _err)
echo Checking files...
for %%i in ("%_base%TOOLS\mkbt.exe" "%_base%TOOLS\pe2usbhd.bin" "%_base%BartPE\i386\setupldr.bin" "%_base%BartPE\bootsect.bin") do if not exist %%i (
  echo Error: File %%i not found!
  echo Please check the pe2usb.txt for details!
  goto _err)
if not "%_format%" == "1" goto _install
echo.
echo *******************************************************************************
echo Drive %_target% will be formatted!!! All data on drive will be erased!
echo *******************************************************************************
echo.
set /p _answer=Type "YES" (uppercase) to continue:
if /i "%_answer%" == "YES" goto _format
echo You type "%_answer%", format aborted...
goto _err
:_format
echo Formating drive "%_target%"...
format %_target% /fs:fat /u /v:usb /backup
if errorlevel 1 (
  echo Error: Format %_target% failed!
  goto _err)
echo Installing bootsector from %_base%TOOLS\pe2usbhd.bin on drive %_target%
"%_base%TOOLS\mkbt.exe" -x -l=BartPE "%_base%TOOLS\pe2usbhd.bin" %_target%
if errorlevel 1 (
  echo Error: Installing bootsector failed!
  goto _err)
:_install
echo Checking bootsector from drive %_target%
"%_base%TOOLS\mkbt.exe" -x -i %_target%
if errorlevel 1 (
  echo Error: Boot sector inspection failed!
  goto _err)
echo Copying %_base%BARTPE\I386\setupldr.bin to %_target%\ntldr
copy /y "%_base%BARTPE\I386\setupldr.bin" %_target%\ntldr
if errorlevel 1 (
  echo Error: copy %_base%BARTPE\I386\setupldr.bin to %_target%\ntldr failed!
  goto _err)
echo Copying %_base%BartPE\i386\ntdetect.com to %_target%\
copy /y "%_base%BartPE\i386\ntdetect.com" %_target%\
if errorlevel 1 (
  echo Error: copy %_base%BartPE\i386\ntdetect.com to %_target%\ failed!
  goto _err)
echo copying data to %_target%
xcopy "%_base%BartPE\*" %_target% /E /Y
if errorlevel 1 (
  echo Error: xcopy failed!
  goto _err)
 
echo.
echo Ready!
echo.
goto _end
:_err
echo.
echo Aborted...
echo There was an error, script aborted!!!
color 00
:_end
endlocal
echo.
echo Done (program will be closed)
pause
 

Всего записей: 2741 | Зарегистр. 15-12-2003 | Отправлено: 17:35 20-07-2009
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Операционные системы » Microsoft Windows » Windows Preinstallation Environment(WinPE) и BartPE LiveCD 6
vu1tur (12-04-2010 11:01): http://forum.ru-board.com/topic.cgi?forum=62&topic=20418


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru