:-----------------------------------------------------------------------------------
: Batch file to install Java-based GUI RAID Manager on Windows 95/98/NT 
: Version 1.11a 2/29/2000  By Jeff Lin
: Version 1.21a 2/20/2001  By Jeff Lin
:-----------------------------------------------------------------------------------
@echo off
echo.
echo    ****************************************************************
echo           Java-based GUI RAID Manager Installation Procedure
echo    ****************************************************************
echo.
echo -----------------------------------
echo SECTION I: JRE v1.4.2 Installtion
echo -----------------------------------
echo.
echo *NOTE: Before you can run Java-based program successfully,
echo        please installed JRE(Java Runtime Enviroment) first. 
echo.
echo Would you like to install JRE v1.4.2 now ?
:JRE_INSTALL
getkey
if errorlevel 2 goto JRE_INSTALL
if errorlevel 1 goto CANCEL_INSTALL
if errorlevel 0 goto OK_INSTALL
goto JRE_INSTALL
:OK_INSTALL
echo.
echo Start to install JRE v1.4.2 .....
echo.
j2re-1_4_2
rem pause
goto SEC2
:CANCEL_INSTALL
echo.
echo JRE v1.4.2 install canceled!
echo.
:SEC2
set path=%path%;c:\windows\system
echo.
echo ------------------------------------------------------
echo SECTION II: Java-based GUI RAID Manager Installation
echo ------------------------------------------------------
echo.
echo *NOTE: To install and configure Java-based GUI RAID Manager successfully,
echo        We highly recommend you refer to INSTALLATION GUIDE first.
echo.
echo Would you like to install Java-based GUI RAID Manager now ?
:GRM_INSTALL
getkey
if errorlevel 2 goto GRM_INSTALL
if errorlevel 1 goto NO_INSTALL
if errorlevel 0 goto YES_INSTALL
:YES_INSTALL
echo.
echo Start to install Java-based GUI RAID Manager .....
echo.
javaw -Djava.compiler="" -jar installshield.jar
:-------------------------------------------
: Copy .java.policy and .keystore files
:-------------------------------------------
copy policy.jav "%UserHome%" 
copy keystore.jav "%UserHome%"
if not exist "%UserHome%\.java.policy" ren "%UserHome%\policy.jav" .java.policy
if not exist "%UserHome%\.keystore" ren "%UserHome%\keystore.jav" .keystore
copy policy.jav "%UserProfile%" 
copy keystore.jav "%UserProfile%"
if not exist "%UserProfile%\.java.policy" ren "%UserProfile%\policy.jav" .java.policy
if not exist "%UserProfile%\.keystore" ren "%UserProfile%\keystore.jav" .keystore
rem ren %UserHome%\policy.jav .java.policy
rem ren %UserHome%\keystore.jav .keystore
echo.
echo Java-based GUI RAID Manager install procedure finished.
echo.
goto END
:NO_INSTALL
echo.
echo Java-based GUI RAID Manager install procedure canceled!
echo.
:END
@echo on
