home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR13 / INSTLBTM.ZIP / INSTALL.BTM next >
Text File  |  1993-09-12  |  3KB  |  89 lines

  1.    : INSTALL.BTM
  2.    : Brent Graham [72714,3413]
  3.    : 09-Sep-93
  4. @ECHO OFF
  5. CLS
  6. SETLOCAL
  7.    : Set directory where .BTM file will be created
  8. SET BATCHDIR=C:\BATCH
  9.    : Get input for where the application program is installed
  10.    : NOTE: Uses ANSI codes at the end!!
  11. SCREEN 1 1
  12. ECHO Directory where program is installed:
  13. SCREEN 2 5
  14. INPUT  %%INSTALLDIR%   
  15.    : Check to see of user pressed <CR> without responding
  16.    : Jump to ERROR if true
  17. IF "%INSTALLDIR%"=="" GOTO ERROR
  18.    : Get input for command(s) to execute
  19.    : NOTE: Uses ANSI codes at the end!!
  20. SCREEN 4 1
  21. ECHO Type in the full DOS command line (NOTE: Use '%%%%' to specify variables):
  22. SCREEN 5 5   
  23. INPUT  %%COMMANDLINE%
  24.    : Check to see of user pressed <CR> without responding
  25.    : Jump to ERROR if true
  26. IF "%COMMANDLINE%"=="" GOTO ERROR
  27.    : Get input for name of .BTM file
  28.    : NOTE: Uses ANSI codes at the end!!
  29. SCREEN 7 1
  30. ECHO Name of .BTM file (NO ext.):
  31. SCREEN 8 5   
  32. INPUT  %%BATCHFILE%   
  33.    : Check to see of user pressed <CR> without responding
  34.    : Jump to ERROR if true
  35. IF "%BATCHFILE%"=="" GOTO ERROR
  36.    : Check to see if specified .BTM file exists
  37.    : Jump to ERROR if true
  38. IF EXIST %BATCHDIR%\%BATCHFILE%.BTM GOTO ERROR
  39.    : Display message to create file
  40. SCREEN 10 1
  41. ECHO Creating %@UPPER[%BATCHFILE%].BTM.  Please wait . . .
  42.    : Write batch command to turn off ECHO
  43. ECHO @ECHO OFF > %BATCHDIR%\%BATCHFILE%.BTM
  44.    : Write batch command to clear screen
  45. ECHO CLS >> %BATCHDIR%\%BATCHFILE%.BTM
  46.    : Write batch command to save system status.
  47. ECHO SETLOCAL >> %BATCHDIR%\%BATCHFILE%.BTM
  48.    : Write batch command to add program directory to PATH
  49. ECHO SET PATH=%%PATH%%;%INSTALLDIR% >> %BATCHDIR%\%BATCHFILE%.BTM
  50.    : Write batch command to change drive and directory to program directory
  51. ECHO CDD %INSTALLDIR% >> %BATCHDIR%\%BATCHFILE%.BTM
  52.    : Write batch command to execute command(s) specified for command line
  53. ECHO %COMMANDLINE% >> %BATCHDIR%\%BATCHFILE%.BTM
  54.    : Write batch command to restore system status
  55. ECHO ENDLOCAL >> %BATCHDIR%\%BATCHFILE%.BTM
  56.    : Write batch command to clear the screen when finished
  57. ECHO CLS >> %BATCHDIR%\%BATCHFILE%.BTM
  58.    : Jump to SUCCESS
  59. GOTO SUCCESS
  60.    : Define ERROR
  61. :ERROR
  62.    : Clear screen
  63. CLS
  64.    : Display error message
  65. TEXT
  66.  
  67.  Installation aborted due to one of the following reasons:
  68.  
  69.     1)  Specified .BTM file already exists.
  70.     2)  The user pressed ENTER without typing a response.
  71.  
  72. ENDTEXT
  73.     : Jump to END
  74. GOTO END
  75.     : Define SUCCESS
  76. :SUCCESS
  77.     : Display success message
  78. TEXT
  79.  
  80.  Installation successful.
  81.  
  82. ENDTEXT
  83.     : Define END
  84. :END
  85.     : Restore system status
  86. ENDLOCAL
  87.     : Return to command line
  88. QUIT
  89.