home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
upsmange.zip
/
CLIENT
/
INSTALL.BAT
< prev
next >
Wrap
DOS Batch File
|
1996-09-13
|
9KB
|
286 lines
@echo off
rem ****************************************************************************
rem * UM-Client OS/2
rem ***************************************************************************
cls
echo UM-Client 2.0 for OS/2 - Installation program V2.02
echo ---------------------------------------------------
echo.
echo.
rem verifying if the current drive and directory is Ok
rem --------------------------------------------------
set BFNAME=INSTALL
set BFEXT=.BAT
if exist %BFNAME%%BFEXT% goto rightdr
echo ************************* W A R N I N G ******************************
echo The current drive and directory must be that where %BFNAME%%BFEXT% is located.
echo The command you typed is :
echo %0
echo To set the right current drive, type :
echo X:
echo where X is the drive letter of the drive where %BFNAME%%BFEXT% is located
echo (most of the times, floppy drives are A: or B:, and CD-ROM drive is E:).
echo After changing to the right drive, you must set the current directory :
echo CD dirname
echo where dirname is the entire path to the directory where %BFNAME%%BFEXT% is
echo located, begining with the character \.
echo You can then re-run %BFNAME% by typing :
echo %BFNAME%
echo ************************************************************************
echo
goto abort
rem the current drive & directory is Ok
rem -----------------------------------
:rightdr
rem * Vérification de l'existence des utilitaires
rem * -------------------------------------------
if exist GETVAR.EXE if exist RECH_LIG.EXE goto copytmp
echo.
echo
echo Installation program cannot be run from this drive,
echo set distribution disk as current disk.
goto abort
rem * Tentative de copie de getvar.exe et rech_lig.exe sur disque
rem * -----------------------------------------------------------
:copytmp
if "%temp%"=="" goto tryc
xcopy GETVAR.EXE %temp%\ >nul
if errorlevel 1 goto tryc
set UMCT=%temp%
goto drivok
:tryc
xcopy GETVAR.EXE C:\ >nul
if errorlevel 1 goto tryd
set UMCT=C:
goto drivok
:tryd
xcopy GETVAR.EXE D:\ >nul
if errorlevel 1 goto notmp
set UMCT=D:
:drivok
if "%UMCT%"=="" goto enverr
rem * Demande le produit à installer
rem * ------------------------------
echo.
echo.
echo Enter your OS/2 configuration :
echo 1- OS/2
echo 2- LAN Server
echo.
echo 3- Exit installation program
echo.
%UMCT%\getvar.exe UMVERS %UMCT%
call %UMCT%\setenv.bat
if not "%UMVERS%" == "1" if not "%UMVERS%" == "2" goto abort
rem * Demande le nom du disque d'installation
rem * ---------------------------------------
echo Enter OS/2 system disk drive [ C: ] :
%UMCT%\getvar.exe UMCD %UMCT%
call %UMCT%\setenv.bat
if "%UMCD%"=="" set UMCD=C:
if "%UMCD%"=="" goto enverr
rem * Demande le répertoire d'installation
rem * ------------------------------------
echo Enter path where UM-Client is to be loaded [ \UPSMAN ] :
%UMCT%\getvar.exe UMCP %UMCT%
call %UMCT%\setenv.bat
if "%UMCP%"=="" set UMCP=\UPSMAN
if "%UMCP%"=="" goto enverr
rem * Vérifie l'existence d'une précédente installation
rem * -------------------------------------------------
if not exist %UMCD%%UMCP%\UMCLIENT\UMC.EXE goto language
echo UM-Client is already installed. Continue (Y/N) ?
%UMCT%\getvar.exe REPONS %UMCT%
call %UMCT%\setenv.bat
if not "%REPONS%" == "Y" if not "%REPONS%" == "y" goto abort
rem * Demande la langue des messages
rem * ------------------------------
:language
echo The available languages for messages are :
echo FRENCH
echo ENGLISH
echo Enter the language (or Q to Quit) :
:retype
%UMCT%\getvar.exe UMCL %UMCT%
call %UMCT%\setenv.bat
if "%UMCL%" == "Q" goto abort
if "%UMCL%" == "q" goto abort
if "%UMCL%" == "french" goto french
if "%UMCL%" == "FRENCH" goto french
if "%UMCL%" == "f" goto french
if "%UMCL%" == "F" goto french
if "%UMCL%" == "english" goto english
if "%UMCL%" == "ENGLISH" goto english
if "%UMCL%" == "e" goto english
if "%UMCL%" == "E" goto english
echo This language is not available, please retype (Q to Quit) :
goto retype
rem Langue Francaise
rem ----------------
:french
set LANGUAGE=FRA
goto confirm
rem Langue Anglaise
rem ---------------
:english
set LANGUAGE=ENG
goto confirm
rem * Demande confirmation
rem * --------------------
:confirm
echo UM-Client will be loaded to %UMCD%%UMCP%. Continue (Y/N) ?
%UMCT%\getvar.exe REPONS %UMCT%
call %UMCT%\setenv.bat
if not "%REPONS%" == "Y" if not "%REPONS%" == "y" goto abort
rem * Sauvegarde des fichiers UMC_PAR, UMC_MESG et scripts s'ils existent
rem * -------------------------------------------------------------------
if not exist %UMCD%%UMCP%\UMCLIENT\*.* goto copyfiles
echo Saving existing initialization files and scripts
echo to directory %UMCD%%UMCP%\UMCLIENT\SAVE ...
if exist %UMCD%%UMCP%\UMCLIENT\UMC_*. xcopy %UMCD%%UMCP%\UMCLIENT\UMC_*. %UMCD%%UMCP%\UMCLIENT\SAVE\ >nul
if errorlevel 1 goto coperr
if exist %UMCD%%UMCP%\UMCLIENT\*.CMD xcopy %UMCD%%UMCP%\UMCLIENT\*.CMD %UMCD%%UMCP%\UMCLIENT\SAVE\ >nul
if errorlevel 1 goto coperr
:copyfiles
rem * Copie des fichiers
echo Copying files to directory %UMCD%%UMCP%\UMCLIENT ...
xcopy *.EXE %UMCD%%UMCP%\UMCLIENT\ >nul
if errorlevel 1 goto coperr
xcopy *.CMD %UMCD%%UMCP%\UMCLIENT\ >nul
if errorlevel 1 goto coperr
xcopy DESINST*.BAT %UMCD%%UMCP%\UMCLIENT\ >nul
if errorlevel 1 goto coperr
xcopy UMC_REF %UMCD%%UMCP%\UMCLIENT\ >nul
if errorlevel 1 goto coperr
xcopy UMC_PAR %UMCD%%UMCP%\UMCLIENT\ >nul
if errorlevel 1 goto coperr
xcopy UMC_PAR.TXT %UMCD%%UMCP%\UMCLIENT\ >nul
if errorlevel 1 goto coperr
xcopy %LANGUAGE%\UMC_MESG %UMCD%%UMCP%\UMCLIENT\ >nul
if errorlevel 1 goto coperr
if "%UMVERS%" == "1" xcopy WORKSTN\*.* %UMCD%%UMCP%\UMCLIENT\ > nul
if errorlevel 1 goto error
if "%UMVERS%" == "2" xcopy SERVER\*.* %UMCD%%UMCP%\UMCLIENT\ > nul
if errorlevel 1 goto error
:sReadme2
echo Copying default initialization files and scripts
echo to directory %UMCD%%UMCP%\UMCLIENT\DEFAULT ...
xcopy %UMCD%%UMCP%\UMCLIENT\UMC_PAR %UMCD%%UMCP%\UMCLIENT\DEFAULT\ >nul
if errorlevel 1 goto coperr
xcopy %UMCD%%UMCP%\UMCLIENT\UMC_MESG %UMCD%%UMCP%\UMCLIENT\DEFAULT\ >nul
if errorlevel 1 goto coperr
xcopy %UMCD%%UMCP%\UMCLIENT\*.CMD %UMCD%%UMCP%\UMCLIENT\DEFAULT\ >nul
if errorlevel 1 goto coperr
rem * Création du fichier ETC\UMC_PATH avec création du répertoire ETC si besoin
rem * --------------------------------------------------------------------------
echo Creating %UMCD%\ETC\UMC_PATH file ...
if not exist %UMCD%\ETC\*.* md %UMCD%\ETC
echo %UMCP%\UMCLIENT> %UMCD%\ETC\UMC_PATH
if not exist %UMCD%\ETC\UMC_PATH goto coperr
rem * Installation du démarrage automatique de UM-Client
rem * -------------------------------------------------
echo Modifying %UMCD%\STARTUP.CMD for automatic startup...
if exist %UMCD%\STARTUP.CMD goto modify
echo File could not be found, automatic startup not installed.
goto complete
:modify
copy %UMCD%\STARTUP.CMD %UMCD%\STARTUP.UMC >nul
copy %UMCD%\STARTUP.CMD %UMCD%\STARTUP.$UM >nul
if not exist %UMCD%\STARTUP.UMC goto coperr
if not exist %UMCD%\STARTUP.$UM goto coperr
echo (Original STARTUP.CMD as been saved to STARTUP.UMC)
rech_lig.exe %UMCD%\STARTUP.$UM \UMC.EXE %UMCT%
echo START /B /N /MIN %UMCP%\UMCLIENT\UMC.EXE -s>%UMCD%\STARTUP.CMD
copy %UMCD%\STARTUP.CMD+%UMCD%\STARTUP.$UM %UMCD%\STARTUP.CMD >nul
erase %UMCD%\STARTUP.$UM
rem * Installation terminée
rem * ---------------------
:complete
rem * Installation de l'UM-Editor
if not exist ..\..\WIN\EDITOR\INSTALL.BAT goto fin
cd ..\..\WIN\EDITOR
call INSTALL.BAT %UMCD% %UMCP%
cd ..\..\OS2\CLIENT
echo.
echo.
echo UM-Client installation procedure completed.
echo You must now run the UM-Client configuration utility.
echo.
goto fin
rem * Pas de repertoire temporaire
rem * ----------------------------
:notmp
echo.
echo
echo No temporary directory was found.
echo Set TEMP environment variable with the name of a
echo temporary working directory (ex : SET TEMP=C:\TMP).
goto abort
rem * Erreur d'environnement DOS
rem * --------------------------
:enverr
echo.
echo
echo DOS environment error,
goto abort
rem * Erreur de copie
rem * ---------------
:coperr
echo.
echo
echo Copy error,
:abort
echo Installation procedure aborted.
goto fin
rem * Fin des traitements
rem * -------------------
:fin
if not "%UMCT%"=="" if exist %UMCT%\getvar.exe erase %UMCT%\getvar.exe >nul
if not "%UMCT%"=="" if exist %UMCT%\setenv.bat erase %UMCT%\setenv.bat >nul
set UMVERS=
set UMCP=
set UMCT=
set UMCD=
set UMCL=
set REPONS=
set BFNAME=
set BFEXT=
set LANGUAGE=
echo.
echo.
pause