@ECHO OFF
ECHO Nortel CallPilot 4.0 Image CD
@echo Microsoft (R) MS-DOS (R) Version 6.20 
@echo Copyright (C) Microsoft Corp 1981-1993. All rights reserved.
PROMPT $P$G
cls

ECHO.
ECHO. 
ECHO.
@ECHO ************** Nortel CallPilot 4.0 Image CD ****************************
@ECHO *                                                                       * 
@ECHO * 1 Install CallPilot server image for 201i then boot (recommended)...  *
@ECHO * 2 Install CallPilot server image for 201i and exit to DOS ...         *
@ECHO *                                                                       *
@ECHO *************************************************************************
ECHO.
z:\ghost\CHOICE /C:12  ENTER 1 to install & boot into Windows setup, 2 to install & exit to DOS
IF ERRORLEVEL 2 GOTO dos
IF ERRORLEVEL 1 GOTO reboot
GOTO END

:dos
cls
ECHO.
ECHO. 
ECHO.
@ECHO ************** Nortel CallPilot 4.0 Image CD *********************
@ECHO *                                                                * 
@ECHO * You have selected to install CallPilot 4.0 on your 201i system * 
@ECHO * from image. This option is intended for the factory to install * 
@ECHO * the the CallPilot image to a customer system, exiting to DOS   * 
@ECHO * upon completion.                                               * 
@ECHO * WARNING: All partitions on all hard drives will be destroyed.  * 
@ECHO *                                                                *
@ECHO ******************************************************************
ECHO.
z:\ghost\CHOICE /C:YN  ENTER Y to start installing, N to abort operation & exit to DOS  
IF ERRORLEVEL 2 GOTO END
IF ERRORLEVEL 1 GOTO IMAGES

:IMAGES

REM ***Start Ghost
z:
cd\
dos201.bat

:reboot
cls
ECHO.
ECHO.
ECHO.
@ECHO *************** Nortel CallPilot 4.0 Image CD ********************
@ECHO *                                                                * 
@ECHO * Are you upgrading from a previous release of CallPilot to      * 
@ECHO * CallPilot 4.0?                                                 *
@ECHO *                                                                *
@ECHO ******************************************************************
ECHO.
z:\ghost\CHOICE /C:YN Enter Y or N  
IF ERRORLEVEL 2 GOTO INSTALLREBOOT
IF ERRORLEVEL 1 GOTO UPGRADEWIZARD

:UPGRADEWIZARD
cls
ECHO.
ECHO.
ECHO.
@ECHO *************** Nortel CallPilot 4.0 Image CD ********************
@ECHO *                                                                * 
@ECHO * Have you downloaded and successfully completed execution of    *
@ECHO * the latest version of the upgrade wizard on your server?       *
@ECHO *                                                                *
@ECHO ******************************************************************
ECHO.
z:\ghost\CHOICE /C:YN Enter Y or N  
IF ERRORLEVEL 2 GOTO MUSTRUNUPGRADEWIZARD
IF ERRORLEVEL 1 GOTO HARDWAREUPDATES

:MUSTRUNUPGRADEWIZARD
cls
ECHO.
ECHO.
ECHO.
@ECHO *************** Nortel CallPilot 4.0 Image CD ********************
@ECHO *                                                                * 
@ECHO * You must successfully complete the upgrade wizard before       *
@ECHO * installing the new CallPilot 4.0 software image. If you do not *
@ECHO * run the upgrade wizard you will not be able to successfully    *
@ECHO * upgrade to CallPilot 4.0.                                      *
@ECHO *                                                                *
@ECHO * The latest version of the upgrade wizard can be downloaded     *
@ECHO * from the Enterprise Solutions PEP Library (ESPL) at:           *
@ECHO *       http://www.nortel.com/espl                               *
@ECHO *                                                                *
@ECHO * Please remove the CallPilot image CD from the CD-ROM drive,    *
@ECHO * manually reboot the server and boot into Windows.              *
@ECHO *                                                                *
@ECHO ******************************************************************
ECHO.
GOTO END

:HARDWAREUPDATES
cls
ECHO.
ECHO.
ECHO.
@ECHO *************** Nortel CallPilot 4.0 Image CD ********************
@ECHO *                                                                * 
@ECHO * Depending on the CallPilot release that you are upgrading from *
@ECHO * you may need to update the server BIOS before you install the  *
@ECHO * CallPilot 4.0 software image.                                  *
@ECHO *                                                                *
@ECHO * The required server BIOS version is:                           *
@ECHO * - 6.0.3                                                        *
@ECHO *                                                                *
@ECHO * Have you checked the server BIOS version and (if required)     *
@ECHO * updated it to the supported version?                           *
@ECHO ******************************************************************
ECHO.
z:\ghost\CHOICE /C:YN Enter Y or N  
IF ERRORLEVEL 2 GOTO MUSTUPDATEHW
IF ERRORLEVEL 1 GOTO INSTALLREBOOT

:MUSTUPDATEHW
cls
ECHO.
ECHO.
ECHO.
@ECHO *************** Nortel CallPilot 4.0 Image CD ********************
@ECHO *                                                                * 
@ECHO * Without removing the CallPilot image CD from the CD-ROM drive, *
@ECHO * manually reboot the server and verify the server BIOS version  *
@ECHO * when the server reboots.                                       * 
@ECHO *                                                                * 
@ECHO * The required server BIOS version is:                           *
@ECHO * - 6.0.3                                                        *
@ECHO *                                                                *
@ECHO * If the server BIOS needs to be updated, from DOS run the       *
@ECHO * phase1.bat batch file and follow the instructions to update    *
@ECHO * the server BIOS version.                                       *
@ECHO ******************************************************************
ECHO.
GOTO END

:INSTALLREBOOT
cls
ECHO.
ECHO. 
ECHO.
@ECHO *************** Nortel CallPilot 4.0 Image CD **********************
@ECHO *                                                                  * 
@ECHO * You have selected to install CallPilot 4.0 on your 201i system   * 
@ECHO * from image. This option is intended for customers who are        *
@ECHO * upgrading from a previous release, or are recovering a server    *
@ECHO * after a catastrophic failure.                                    *
@ECHO *                                                                  *
@ECHO * Once the image copy has completed, the system will reboot        *
@ECHO * automatically into the Windows 2003 mini-setup.                  *
@ECHO *                                                                  *
@ECHO * WARNING: This process will erase all of the data on the hard     *
@ECHO *          drives in the CallPilot server.                         * 
@ECHO *                                                                  *
@ECHO ********************************************************************
ECHO.
z:\ghost\CHOICE /C:YN  ENTER Y to start installing, N to abort operation & go to DOS  
IF ERRORLEVEL 2 GOTO END
IF ERRORLEVEL 1 GOTO IMAGES2
GOTO END

:IMAGES2

REM ***Start Ghost
z:\ghost\ghost.exe -script=z:\script2.txt
IF ERRORLEVEL 1 GOTO GHOSTPROBLEM
REM ** Add any commands required to run if Symantec Ghost
REM succeeds here**
GOTO END

GHOSTPROBLEM:
cls
ECHO. 
ECHO.
ECHO.
@ECHO ABORT ***********************************************************
@ECHO *                                                               * 
@ECHO * Ghost image installation process has been interrupted, and    * 
@ECHO * could not resume. Please reboot your system with the first    *
@ECHO * image CD in the CD tray.                                      *
@ECHO *                                                               *
@ECHO *****************************************************************
ECHO.
ECHO. 
GOTO END

:END
z:
cd\
