home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR13
/
INSTLBTM.ZIP
/
INSTALL.BTM
next >
Wrap
Text File
|
1993-09-12
|
3KB
|
89 lines
: INSTALL.BTM
: Brent Graham [72714,3413]
: 09-Sep-93
@ECHO OFF
CLS
SETLOCAL
: Set directory where .BTM file will be created
SET BATCHDIR=C:\BATCH
: Get input for where the application program is installed
: NOTE: Uses ANSI codes at the end!!
SCREEN 1 1
ECHO Directory where program is installed:
SCREEN 2 5
INPUT %%INSTALLDIR%
: Check to see of user pressed <CR> without responding
: Jump to ERROR if true
IF "%INSTALLDIR%"=="" GOTO ERROR
: Get input for command(s) to execute
: NOTE: Uses ANSI codes at the end!!
SCREEN 4 1
ECHO Type in the full DOS command line (NOTE: Use '%%%%' to specify variables):
SCREEN 5 5
INPUT %%COMMANDLINE%
: Check to see of user pressed <CR> without responding
: Jump to ERROR if true
IF "%COMMANDLINE%"=="" GOTO ERROR
: Get input for name of .BTM file
: NOTE: Uses ANSI codes at the end!!
SCREEN 7 1
ECHO Name of .BTM file (NO ext.):
SCREEN 8 5
INPUT %%BATCHFILE%
: Check to see of user pressed <CR> without responding
: Jump to ERROR if true
IF "%BATCHFILE%"=="" GOTO ERROR
: Check to see if specified .BTM file exists
: Jump to ERROR if true
IF EXIST %BATCHDIR%\%BATCHFILE%.BTM GOTO ERROR
: Display message to create file
SCREEN 10 1
ECHO Creating %@UPPER[%BATCHFILE%].BTM. Please wait . . .
: Write batch command to turn off ECHO
ECHO @ECHO OFF > %BATCHDIR%\%BATCHFILE%.BTM
: Write batch command to clear screen
ECHO CLS >> %BATCHDIR%\%BATCHFILE%.BTM
: Write batch command to save system status.
ECHO SETLOCAL >> %BATCHDIR%\%BATCHFILE%.BTM
: Write batch command to add program directory to PATH
ECHO SET PATH=%%PATH%%;%INSTALLDIR% >> %BATCHDIR%\%BATCHFILE%.BTM
: Write batch command to change drive and directory to program directory
ECHO CDD %INSTALLDIR% >> %BATCHDIR%\%BATCHFILE%.BTM
: Write batch command to execute command(s) specified for command line
ECHO %COMMANDLINE% >> %BATCHDIR%\%BATCHFILE%.BTM
: Write batch command to restore system status
ECHO ENDLOCAL >> %BATCHDIR%\%BATCHFILE%.BTM
: Write batch command to clear the screen when finished
ECHO CLS >> %BATCHDIR%\%BATCHFILE%.BTM
: Jump to SUCCESS
GOTO SUCCESS
: Define ERROR
:ERROR
: Clear screen
CLS
: Display error message
TEXT
Installation aborted due to one of the following reasons:
1) Specified .BTM file already exists.
2) The user pressed ENTER without typing a response.
ENDTEXT
: Jump to END
GOTO END
: Define SUCCESS
:SUCCESS
: Display success message
TEXT
Installation successful.
ENDTEXT
: Define END
:END
: Restore system status
ENDLOCAL
: Return to command line
QUIT