CCTV TECH
Nassau, Bahamas
Search this site Search Help
Default
Newest
Oldest
CCTV Forum News
Use our miniPSS tool to get
enhanced hotkeys in PSS.
miniPSS is an EXE wrapper
for PSS on Windows XP/7.
Visit the Forum Post
 
 
 
USB Recovery Console

UPDATED March 29th, 2011:
added the HP USB DOS format tool

This creates a Bootable USB Drive for the XP Recovery Console.

Windows XP Setup will not be included.

** THIS IS FOR INFORMATION ONLY - USE AT YOUR OWN RISK **

You will require ADMIN privileges on your Windows computer.

This uses the HP USB Dos format tool and is copyright HP.
That tool is no longer available on the HP site so it is included in this download.
You must accept the HP End User License which is also included.

The process is as follows:

Create temp folder
Extract/Copy Format.com into a temp folder
Run Format.com and dismount USB drive
Run HP Format tool and make USB drive bootable
Run BootSect to make NT Bootable
Create the ~BT Folder from the users Source
Copy all boot files to the USB Drive
Create bootsector for boot.ini and save on USB drive
Remove temp folder

READ ME
------------------

Download the attached package.
Right click over mkrecovery.cmd and click edit.
Change USBDRV value R: to the letter of your USB Drive.
Change XPSRC to the path of your Windows XP Setup folder.
Exit and Save then click on Batch File.

** MAKE SURE THE USB DRIVE LETTER IS CORRECT **

Download the ready made package:
Download ZIP


BATCH FILE
------------------

Make new Text file and rename it something.cmd (whatever you want to name it, eg. mkrecovery.cmd)
Right click EDIT then place the following into it, change the USB Drive letter, and save.

mkrecovery.cmd
@echo off

:: MAKE USB DISK NT BOOTABLE 
:: USES XP SETUP SOURCE
:: CHANGE USER SETTINGS BELOW

:_setting

   SET USBDRV=R:
   SET XPSRC=C:\XPSP3\I386

:_load

   CLS
   ECHO ALL FILES WILL BE DELETED ON USB DRIVE %USBDRV%
   ECHO CLICK THE [X] AT THE TOP RIGHT TO EXIT NOW OR ...
   PAUSE
   CLS

:_chkusb

   :: CHECK USB DRIVE
   ECHO checking USB Drive %USBDRV% ..

   IF NOT EXIST %USBDRV%\CON GOTO _ERR
   IF %USBDRV%==C: GOTO _ERR
   IF %USBDRV%==c: GOTO _ERR

:_chksrc

   :: CHECK XP SOURCE
   ECHO checking XP source ..
   IF NOT EXIST %XPSRC%\expand.exe GOTO _ERR
   IF NOT EXIST %XPSRC%\DOSNET.INF GOTO _ERR

:_chksys

   :: CHECK REQUIRED FILES
   ECHO checking required files ..

   IF NOT EXIST SYSTEM\bootsect.exe GOTO _ERR
   IF NOT EXIST SYSTEM\mkbt.exe GOTO _ERR
   IF NOT EXIST SYSTEM\stldr.bin GOTO _ERR
   IF NOT EXIST SYSTEM\HPUSBF.EXE GOTO _ERR
   IF NOT EXIST SYSTEM\make~btmod.vbs GOTO _ERR
   IF NOT EXIST SYSTEM\command.com GOTO _ERR
   IF NOT EXIST SYSTEM\io.sys GOTO _ERR
   IF NOT EXIST SYSTEM\msdos.sys GOTO _ERR
   IF NOT EXIST SYSTEM\boot.ini GOTO _ERR
   IF NOT EXIST SYSTEM\$TEMP\CON MD SYSTEM\$TEMP
   DEL /Q SYSTEM\$TEMP\*.*
   IF NOT EXIST SYSTEM\$TEMP\CON GOTO _ERR

:_chkformat

   :: CHECK FORMAT EXISTS
   ECHO checking format.com ..

   :: TRY EXPAND FROM XP SOURCE 
   IF EXIST %XPSRC%\format.co_ %XPSRC%\EXPAND %XPSRC%\format.co_ -F:format.com SYSTEM\$TEMP\format.com

   IF NOT EXIST SYSTEM\$TEMP\format.com ECHO format.com not extracted
   IF NOT EXIST SYSTEM\$TEMP\format.com GOTO _hpformat

   ECHO format.com extracted okay

:_xpformat

   ECHO formatting with xp format.com ..
   SYSTEM\$TEMP\format.com %USBDRV% /FS:FAT /q /u /backup /v:ETOOLS /x

:_hpformat

   ECHO formatting with HP USB format ..
   SYSTEM\HPUSBF %USBDRV% -FS:FAT -V:ETOOLS -B:SYSTEM -Y

   DEL %USBDRV%\COMMAND.COM
   DEL %USBDRV%\*.* /f /q /a:RHS

:_bootsec

   ECHO create nt bootsector ..
   SYSTEM\BootSect.exe /nt52 %USBDRV% /force

:_makebt

   ECHO making ~bt folder ..
   Start /wait SYSTEM\make~btmod.vbs %XPSRC%

:_copybt1

   ECHO copying boot files to USB drive ..
   COPY /y SYSTEM\boot.ini %USBDRV%\boot.ini

   IF NOT EXIST SYSTEM\$TEMP\$WIN_NT$.~BT\ntdetect.com ECHO ntdectect.com not found
   IF NOT EXIST SYSTEM\$TEMP\$WIN_NT$.~BT\ntldr ECHO ntldr not found
   IF NOT EXIST %XPSRC%\setupldr.bin ECHO setupldr.bin not found
   IF NOT EXIST %XPSRC%\txtsetup.sif ECHO txtsetup.sif not found

   IF NOT EXIST SYSTEM\$TEMP\$WIN_NT$.~BT\ntdetect.com GOTO _ERR
   IF NOT EXIST SYSTEM\$TEMP\$WIN_NT$.~BT\ntldr GOTO _ERR
   IF NOT EXIST %XPSRC%\setupldr.bin GOTO _ERR
   IF NOT EXIST %XPSRC%\txtsetup.sif GOTO _ERR

   COPY /y SYSTEM\$TEMP\$WIN_NT$.~BT\ntdetect.com %USBDRV%\ntdetect.com
   COPY /y SYSTEM\$TEMP\$WIN_NT$.~BT\ntldr %USBDRV%\ntldr
   COPY /y %XPSRC%\setupldr.bin %USBDRV%\stldr
   COPY /y %XPSRC%\txtsetup.sif %USBDRV%\txtsetup.sif

:_copybt2

   :: TRY EXPAND FROM XP SOURCE 
   IF EXIST %XPSRC%\xcopy.ex_ %XPSRC%\EXPAND %XPSRC%\xcopy.ex_ -F:xcopy.exe SYSTEM\$TEMP\xcopy.exe

   IF NOT EXIST SYSTEM\$TEMP\xcopy.exe ECHO xcopy.exe not extracted
   IF NOT EXIST SYSTEM\$TEMP\xcopy.exe GOTO _ERR

   IF NOT EXIST %USBDRV%\$WIN_NT$.~BT\CON MKDIR %USBDRV%\$WIN_NT$.~BT
   IF EXIST SYSTEM\$TEMP\$WIN_NT$.~BT\CON ECHO copying BT files to USB Drive ..
   IF EXIST SYSTEM\$TEMP\$WIN_NT$.~BT\CON SYSTEM\$TEMP\xcopy.exe SYSTEM\$TEMP\$WIN_NT$.~BT\*.* _
   %USBDRV%\$WIN_NT$.~BT /i /k /e /r /y /h

:_finish

   If NOT EXIST %USBDRV%\BTSEC\CON MKDIR %USBDRV%\BTSEC

   Start /wait SYSTEM\mkbt.exe -x -c %USBDRV% %USBDRV%\BTSEC\BackUp.bs
   Start /wait SYSTEM\mkbt.exe -x SYSTEM\stldr.bin %USBDRV%
   Start /wait SYSTEM\mkbt.exe -x -c %USBDRV% %USBDRV%\BTSEC\stldr.bs
   Start /wait SYSTEM\mkbt.exe -x %USBDRV%\BTSEC\BackUp.bs %USBDRV%

   GOTO _EXIT

:_ERR

   IF EXIST SYSTEM\$TEMP\CON RD /S /Q SYSTEM\$TEMP
   ECHO ERROR!!
   PAUSE
   EXIT

:_EXIT

   IF EXIST SYSTEM\$TEMP\CON RD /S /Q SYSTEM\$TEMP
   ECHO.
   ECHO Completed Okay
   PAUSE
   EXIT


CCTV | DVR | Video Surveillance | CCTV Cameras | Remote Video | Tech Support | Software | Scripts | Articles | Burglar Alarms | Alarm Monitoring | Real Estate
Copyright © 2001/2012 BahamasSecurity.com
 
Website hosted in Nassau, The Bahamas