home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / 9UTI / TC32201.ZIP / _TCINST.BTM (.txt) next >
4DOS Compressed Batch-To-Memory File  |  1998-02-02  |  16KB  |  694 lines

  1. @*echo off
  2. *setlocal
  3. *unalias *
  4. setdos /g.,
  5. set product=Take Command
  6. on errormsg goto on_error
  7. on break goto on_break
  8. goto start
  9.  
  10. text > nul
  11.  
  12.                 _TCINST.BTM -- Take Command Self-Install
  13.  
  14.          Copyright 1998, JP Software Inc., All Rights Reserved.
  15.          Author:  Tom Rawson   Last Revision:  February 2, 1998
  16.  
  17. This file is used to install a downloaded copy of Take Command/16, Take
  18. Command/32, or Take Command for OS/2.  It performs basic installation
  19. functions once, then renames itself so it will not be run automatically
  20. a second time.
  21.  
  22. DO NOT MODIFY THIS FILE UNLESS INSTRUCTED TO DO SO BY OUR SUPPORT STAFF.
  23. We cannot provide support for the installation process if you have
  24. modified the installation batch file!
  25.  
  26. The primary functions provided by this file are:
  27.  
  28.    * Check that required files appear to have been extracted OK,
  29.      and perform other similar tests for proper version, operating
  30.      system, etc.
  31.  
  32.    * Locate the previous copy of the product, if any.
  33.  
  34.    * If there was a previous copy:
  35.       - Copy over the old .INI and TCSTART files.
  36.       - Update the old .INI file for the new path.
  37.       - Allow branding of the new version if appropriate.
  38.  
  39.    * For Take Command/16:
  40.       - Copy CTL3D as required
  41.       - Use DDE to set up a Take Command group.
  42.  
  43.    * For Take Command/32:
  44.       - If running in Windows NT 3.5, copy CTL3D as required
  45.       - If running in Win95 or NT 4.0+, create a shortcut for Take Command,
  46.         and add registry extensions.
  47.  
  48.    * For Take Command for OS/2:
  49.       - Call a REXX script to update CONFIG.SYS (updates OS2_SHELL, COMSPEC,
  50.         BOOKSHELF, DPATH, and LIBPATH).
  51.       - Call a REXX script to create a desktop object for Take Command for
  52.         OS/2.
  53. endtext
  54.  
  55.  
  56. :start
  57. iff %_dos eq WIN then
  58.    iff %_winver ge 3.20 then
  59.       cls
  60.       text
  61.  
  62. Take Command/16 is designed to run under Windows 3.1, 3.11, and Windows
  63. for Workgroups.  We do not recommend installing it under Windows 95/98
  64. or Windows NT.  For a native 32-bit Windows implementation of our GUI
  65. command line tools use Take Command/32, rather than Take Command/16.
  66.  
  67.       endtext
  68.       goto done
  69.    endiff
  70.    if %_4ver ge 2.0 goto verok
  71. endiff
  72. if %_dos eq WIN95 .and. %_4ver ge 2.0 goto verok
  73. if %_dos eq WIN98 .and. %_4ver ge 2.0 goto verok
  74. if %_dos eq WIN32 .and. %_4ver ge 2.0 goto verok
  75. if %_dos eq PM .and. %_4ver ge 2.0 goto verok
  76. cls
  77. text
  78.  
  79. This automated installation batch file is for use under Take Command 2.0
  80. or above.  It will not work for other products, or earlier versions.
  81.  
  82. endtext
  83. goto done
  84.  
  85.  
  86. :verok
  87. echo.
  88. echo Setting up ...
  89.  
  90.  
  91. setdos /c%=^ 
  92. setdos /p%=& 
  93. setdos /e%= 
  94.  
  95. option //execwait=Yes
  96.  
  97. alias fatalerr `(echo %& %+ goto fatalerr)`
  98. alias wait `echo. %+ pause Press any key to continue ...`
  99. alias yesno `echo. %+ inkey /k"yn" %2& (Y/N)? %%%1`
  100. alias retry `(beep %+ iff "%2&" ne "" then %+ echo. %+ echo %2& %+ endiff %+ goto %1)`
  101. alias callrexx `pushd %+ call %& %+ set result=%? %+ popd`
  102. alias instinf `pushd %+ %instinf %& %+ popd`
  103. alias sep `echo. %+ echo %@repeat[%1,72] %+ echo.`
  104. alias clear `cls %+ echo. %+ echo.`
  105.  
  106. set reltype=%4
  107.  
  108. set cd=%_cwds
  109. set instinf=rem
  110. switch %_dos
  111.    case WIN
  112.       set product=Take Command/16
  113.       set base=TCMD
  114.       set cd=%@upper[%cd]
  115.       set opsys=Windows
  116.    case WIN95
  117.       set product=Take Command/32
  118.       set base=TCMD32
  119.       set cd=%@sfn["%cd"]
  120.       set instinf=rundll.exe
  121.       if "%windir" ne ""  .and. exist %windir\rundll.exe set instinf="%windir\rundll.exe"
  122.       set instinf=%instinf setupx.dll,InstallHinfSection DefaultInstall 132
  123.       set opsys=Windows 95
  124.    case WIN98
  125.       set product=Take Command/32
  126.       set base=TCMD32
  127.       set cd=%@sfn["%cd"]
  128.       set instinf=rundll.exe
  129.       if "%windir" ne ""  .and. exist %windir\rundll.exe set instinf="%windir\rundll.exe"
  130.       set instinf=%instinf setupx.dll,InstallHinfSection DefaultInstall 132
  131.       set opsys=Windows 98
  132.    case WIN32
  133.       set product=Take Command/32
  134.       set base=TCMD32
  135.       set cd=%@sfn["%cd"]
  136.       if %_dosver ge 4.00 set instinf="%SystemRoot\System32\rundll32.exe" setupapi,InstallHinfSection DefaultInstall 132
  137.       set opsys=Windows NT
  138.    case PM
  139.       set product=Take Command for OS/2
  140.       set base=TCMDOS2
  141.       set opsys=OS/2
  142. endswitch
  143.  
  144. set majordate=6405
  145. set newbdate=6405
  146.  
  147. switch %base
  148.    case TCMD
  149.       set reqfiles=TCMD.EXE TC16DLL.DLL TCMD.HLP
  150.       set exefile=TCMD.EXE
  151.       set batext=BTM BAT
  152.    case TCMD32
  153.       set reqfiles=TCMD32.EXE TC32DLL.DLL TCMD32.HLP TCMD32.CNT SHRALIAS.EXE
  154.       set exefile=TCMD32.EXE
  155.       set batext=BTM CMD BAT
  156.    case TCMDOS2
  157.       set reqfiles=TCMDOS2.EXE JPOS2DLL.DLL KEYSTACK.EXE TCMDOS2.INF TCMDOS2H.MSG JPOS2INS.CMD
  158.       set exefile=TCMDOS2.EXE
  159.       set batext=BTM CMD
  160. endswitch
  161.  
  162.  
  163. cls
  164. echo.
  165. echo.
  166. echo Welcome to Take Command!
  167. echo.
  168. echo This installation procedure is run automatically the first time you
  169. echo start a new downloaded or trial copy of Take Command.  It is written
  170. echo entirely in the Take Command batch language.
  171. echo.
  172. echo If you are new to Take Command, this procedure will install Take Command
  173. echo on your system.  No system files will be modified without your
  174. echo permission.
  175. echo.
  176. echo If you already have a previous version of Take Command installed, this
  177. echo procedure will copy the settings (in the .INI and TCSTART files) and
  178. echo registration information (if available) from the previous version, and
  179. echo -- after requesting your permission -- will update the appropriate
  180. echo configuration files.
  181. echo.
  182. echo If you have already installed this new version of Take Command, or prefer
  183. echo to perform the installation manually as described in the %base.TXT file,
  184. echo you can exit now, and this installation program will not be run again.
  185. echo.
  186. inkey /k"yn" Proceed with installation (Y/N)? %%yn
  187. if "%yn" ne "Y" goto exit_noretry
  188.  
  189. cdd "%@path["%@full[%0]"]" || (echo Cannot switch to the product directory! %+ goto fatalerr)
  190.  
  191. iff not exist %exefile then
  192.    cls
  193.    echo.
  194.    echo The Take Command automated installation batch file is not in the
  195.    echo directory where the product files are stored.  Please put all
  196.    echo the new Take Command files in the same directory and try again.
  197.    goto done
  198. endiff
  199.  
  200.  
  201. for %f in (%reqfiles) if not exist %f (set errname=%f %+ goto missing_file)
  202. goto filesok
  203.  
  204. :missing_file
  205. sep =
  206. echo The %errname file is missing.  This file is required to install
  207. echo %product.  Please check that all downloaded files were
  208. echo placed in the same directory.
  209. goto nonfatalerr
  210.  
  211.  
  212. :filesok
  213.  
  214. clear
  215. echo This procedure installs %product version %_4ver.
  216. yesno pver Are you currently using an earlier version of%=n%product on your system
  217.  
  218. if "%pver" ne "Y" goto noprev
  219.  
  220. :getpdir
  221. sep -
  222. echo Please enter the directory where your previous
  223. input version of %product is installed:  %%prevdir
  224. set prevdir="%prevdir"
  225. iff %base eq TCMD32 then
  226.    set prevdir=%@sfn[%prevdir]
  227. endiff
  228. set slashdir=prevdir
  229. gosub addslash
  230.  
  231. if not isdir %prevdir retry getpdir That is not a valid directory
  232. iff not exist %[prevdir]%exefile then
  233.    echo This directory does not appear to contain a previous version of
  234.    echo %product.  Please try again.
  235.    retry getpdir
  236. endiff
  237.  
  238. set prevdate=%@date[%@filedate[%[prevdir]%exefile]]
  239. set majorupg=%@if[%prevdate lt %majordate,Y,N]
  240. set newbrand=%@if[%prevdate ge %newbdate,Y,N]
  241. unset prevdate
  242.  
  243. clear
  244. echo Your current %base.INI, TCSTART, and TCEXIT files (if any) will now be
  245. echo copied from the previous Take Command directory.  If these files already
  246. echo exist in the new Take Command directory you will be prompted for whether
  247. echo to replace the file in the new directory with the file from the old
  248. echo directory.
  249. echo.
  250. yesno yn Copy the %base.INI, TCSTART, and TCEXIT files
  251. iff "%yn" eq "Y" then
  252.  
  253.    :: Copy the files
  254.    if exist %[prevdir]%[base].ini copy %[prevdir]%[base].ini .\
  255.    for %f in (TCSTART TCEXIT) for %e in (%batext) if exist %[prevdir]%f.%e copy %[prevdir]%f.%e .\
  256.  
  257.    :: Update paths in INI file
  258.    iff exist %base.INI then
  259.       sep -
  260.       echo Any TCStartPath directive in the new copy of %base.INI will now be
  261.       echo updated to point to your new Take Command directory.  The old .INI file
  262.       echo will be saved as %base.JPS.  If you do not allow this update, you must
  263.       echo perform it manually, or %product may not work properly.
  264.       echo.
  265.       yesno yn Update %base.INI
  266.       set jptemp=%@unique[.]
  267.       iff "%yn" eq "Y" then
  268.          iff %base eq TCMDOS2 then
  269.             callrexx jpos2ins.cmd "TCMD" "%cd" "UpdateINI" "TCMDOS2.INI" "%jptemp"
  270.          else
  271.             if %base eq TCMD32 set jptemp=%@sfn[%jptemp]
  272.             copy %base.INI %jptemp > nul
  273.             set oldtcpath=%@iniread[%jptemp,TakeCommand,TCStartPath]
  274.             if "%oldtcpath" ne "" set result=%@iniwrite[%jptemp,TakeCommand,TCStartPath,%cd]
  275.          endiff
  276.          iff %result eq 0 then
  277.             copy %base.INI %base.JPS > nul
  278.             del /q %base.INI > nul
  279.             copy "%jptemp" %base.INI > nul
  280.          else
  281.             sep -
  282.             echo Paths in %base.INI could not be updated.  Be sure to manually update
  283.             echo any settings in %base.INI which point to the Take Command directory.
  284.             echo If you do not, %product may not work properly.
  285.          endiff
  286.          wait
  287.       endiff
  288.       del /q "%jptemp" > nul
  289.    endiff
  290.  
  291. else
  292.    sep -
  293.    echo You chose not to copy existing startup files from your previous Take
  294.    echo Command directory.  You may want to copy these files manually at a
  295.    echo later time, and update them for the new version.
  296.    wait
  297. endiff
  298.  
  299.  
  300. clear
  301.  
  302. if "%reltype" eq "P" goto trialver
  303.  
  304. echo The next part of the installation process varies depending on whether
  305. echo you own a purchased or "registered" version of %product, as
  306. echo opposed to a trial or "shareware" version.
  307. echo.
  308. yesno yn Are you upgrading from a previously purchased%=ncopy of %product
  309. if "%yn" ne "Y" goto trialver
  310.  
  311.  
  312. iff %newbrand eq Y then
  313.  
  314.    :: Previous version is 2.0 or later
  315.    iff %majorupg eq Y then
  316.       :: Major update, order is probably required
  317.       sep -
  318.       echo The installation software has determined that you are installing a
  319.       echo major update to Take Command (as opposed to a minor or maintenance
  320.       echo update).
  321.       echo.
  322.       echo Normally such updates must be purchased; please contact JP Software
  323.       echo or your dealer for details.  If you order an upgrade you can use the
  324.       echo trial version while you wait for your upgrade to arrive.
  325.       echo.
  326.       echo If you believe you are eligible for a free registered copy of this
  327.       echo version even though it is a major update (for example, because you
  328.       echo purchased a special offer which included the next version), you can try
  329.       echo to "brand" Take Command with your name and serial number manually; for
  330.       echo instructions see the README.TXT file.  If branding fails with the
  331.       echo message "Contact JP Software or your dealer for an upgrade" then you
  332.       echo must purchase the upgrade.
  333.    else
  334.       :: Minor update
  335.  
  336.       :: If TCOS2, copy JPCONFIG.INI
  337.       if (%_dos eq PM .and. exist %[prevdir]jpconfig.ini) copy /u %[prevdir]jpconfig.ini .\ > nul
  338.  
  339.       sep -
  340.       echo The installation software has determined that you are installing a
  341.       echo minor or maintenance update to Take Command.  The "branding" (name
  342.       echo and serial number) information should already be stored on your
  343.       echo system, and will be transferred automatically to the new version.
  344.       echo.
  345.       echo If the information does not transfer properly, or you need to
  346.       echo reinstall your branding information for any other reason, see the
  347.       echo manual branding instructions in the README.TXT file.
  348.       echo.
  349.    endiff
  350.  
  351. else
  352.  
  353.    :: Updating from 1.0x
  354.    sep -
  355.    echo This portion of the installation process provides information on "branding"
  356.    echo the new version of %product with your name and serial number.
  357.    echo.
  358.    echo This section is informational only; you cannot actually brand Take
  359.    echo Command now because it is in use (to run this installation batch file),
  360.    echo and %opsys does not allow running programs to be modified.  For
  361.    echo manual branding instructions see the README.TXT file.
  362.    echo.
  363.    echo You will only be eligible to brand this upgrade if you originally
  364.    echo purchased Take Command 1.0x on diskette, and you are now upgrading to
  365.    echo version 2.0.  If you originally obtained Take Command on our CD Suite,
  366.    echo in most cases you must purchase the version 2.0 upgrade (once you order
  367.    echo the upgrade you can continue to use this trial version until your order
  368.    echo arrives).  For more information see PRODUCTS.TXT and UPGFORM.TXT.
  369.    echo.
  370.    echo Branding will also require the brand program and brand information
  371.    echo (name, serial number, and validation code) from your previous version of
  372.    echo Take Command.  If you are eligible for the upgrade at no charge but have
  373.    echo lost your brand information, contact JP Software to obtain a replacement
  374.    echo (there is a small charge for this service).
  375.  
  376. endiff
  377.  
  378. wait
  379. goto doconfig
  380.  
  381.  
  382. :noprev
  383. :trialver
  384. sep -
  385. iff "%reltype" eq "P" then
  386.    :: Pre-release
  387.    echo You may use this pre-release version of %product until
  388.    echo the date stated in the signon message when the program starts, or
  389.    echo in the README.TXT or other similar file which came with the
  390.    echo pre-release.
  391.    echo.
  392.    echo After that time you must upgrade to or purchase the final release under
  393.    echo our standard license terms.  This pre-release version may be difficult
  394.    echo to use or cease to operate properly after the date shown in the signon
  395.    echo message or documentation.
  396.    echo.
  397.    echo See the license agreement in the file LICENSE.TXT for complete details.
  398. else
  399.    :: Shareware
  400.    echo You may use this new trial version of %product for up to 21
  401.    echo days while evaluating it.  After that time you must purchase Take Command
  402.    echo if you continue to use it.  See our license agreement in the file
  403.    echo LICENSE.TXT for complete details.
  404. endiff
  405. wait
  406.  
  407.  
  408. :doconfig
  409.  
  410. if %base ne TCMDOS2 goto configdone
  411.  
  412. set csname=%_boot:\CONFIG.SYS
  413. set csbak=%_boot:\CONFIG.JPS
  414. set csmod=N
  415. clear
  416. echo The installation process updates paths in CONFIG.SYS so that Take Command
  417. echo for OS/2 can locate its files properly.  You have three choices:
  418. echo.
  419. echo    - Update the system CONFIG.SYS file.  This is the recommended method
  420. echo      and will fully install Take Command for OS/2 on your system.  Your
  421. echo      previous CONFIG.SYS file will be saved as CONFIG.JPS.
  422. echo.
  423. echo    - Make a copy of CONFIG.SYS in the Take Command for OS/2 directory
  424. echo      and update that copy, instead of the "real" CONFIG.SYS file.  This
  425. echo      allows you to review the changes before implementing them.  If
  426. echo      there is already a copy of CONFIG.SYS in the Take Command for OS/2
  427. echo      directory it will be renamed CONFIG.JPS.
  428. echo.
  429. echo    - Skip the CONFIG.SYS update.  In this case you will have to update
  430. echo      CONFIG.SYS manually (see the TCMDOS2.TXT file for details).
  431. echo.
  432. echo Enter:  Y to update %csname
  433. echo         C to update a copy of CONFIG.SYS in the Take Command directory
  434. echo         N to skip the CONFIG.SYS changes
  435. echo.
  436. inkey /k"YNC" Your choice:  %%csopt
  437.  
  438. switch %csopt
  439.  
  440.    case Y
  441.       set jptemp=%@unique[.]
  442.       callrexx jpos2ins.cmd "TCMD" "%cd" "UpdatePaths" "%csname" "%jptemp"
  443.       iff %result eq 0 then
  444.          copy %csname %csbak > nul
  445.          copy "%jptemp" %csname > nul
  446.          set csmod=Y
  447.          sep -
  448.          echo CONFIG.SYS has been updated.
  449.       else
  450.          sep -
  451.          echo CONFIG.SYS could not be updated due to the above error.  You must update
  452.          echo it manually (see the TCMDOS2.TXT file for details).
  453.       endiff
  454.       del /q "%jptemp" > nul
  455.  
  456.    case C
  457.       echo.
  458.       if exist .\config.sys (move .\CONFIG.SYS .\CONFIG.JPS > nul)
  459.       callrexx jpos2ins.cmd "TCMD" "%cd" "UpdatePaths" "%csname" "%[cd]CONFIG.SYS"
  460.       iff %result eq 0 then
  461.          sep -
  462.          echo The copy of CONFIG.SYS has been updated.  You can review this file, then
  463.          echo make changes to the real CONFIG.SYS file manually when you are ready.
  464.       else
  465.          sep -
  466.          echo The copy of CONFIG.SYS could not be updated due to the above error.  You
  467.          echo must update CONFIG.SYS manually (see the TCMDOS2.TXT file for details).
  468.       endiff
  469.  
  470.    case N
  471.       sep -
  472.       echo CONFIG.SYS will not be updated.  You can update it manually when you are
  473.       echo ready (see the TCMDOS2.TXT file for details).
  474.  
  475. endswitch
  476. wait
  477.  
  478.  
  479. :configdone
  480.  
  481.  
  482. switch %base
  483.  
  484.    case TCMD
  485.       clear
  486.       text
  487. The installation software can create a JP Software program group for
  488. Take Command/16, accessible from Program Manager.  The group will
  489. include items to start Take Command itself, and the Take Command help.
  490.  
  491. If you choose not to create these items now, you can create them
  492. manually at any time.  For instructions see the TCMD.TXT file, in the
  493. chapter on installing Take Command/16.
  494.  
  495. The group creation process may not work properly if Program Manager is
  496. not your Windows shell.
  497.       endtext
  498.       yesno yn Create a program group and items for Take Command/16
  499.       iff "%yn" == "Y" then
  500.          on errormsg
  501.          echo.
  502.          echo Working ...
  503.          ddeexec progman, progman, [CreateGroup(JP Software)]
  504.          (ddeexec progman, progman, [ReplaceItem(Take Command Prompt)]) >& nul
  505.          ddeexec progman, progman, [AddItem(%[cd]%exefile,Take Command Prompt,,,,,%_cwd,,)]
  506.          (ddeexec progman, progman, [ReplaceItem(Take Command Help)]) >& nul
  507.          ddeexec progman, progman, [AddItem(WINHELP %[cd]TCMD.HLP,Take Command Help,,,,,%_cwd,,)]
  508.          on errormsg goto on_error
  509.          activate "%_wintitle"
  510.          echo.
  511.          echo The program group and items have been created.
  512.          wait
  513.       endiff
  514.  
  515.       sep -
  516.       text
  517. Take Command/16 includes a feature called "Caveman" which allows you
  518. to run DOS applications within the Take Command window.  In order to
  519. use Caveman, you must add a line to the Windows SYSTEM.INI file to
  520. load the Caveman driver, CAVEMAN.386.
  521.  
  522. Due to the structure of SYSTEM.INI, the installation software cannot
  523. perform this step for you reliably.  If you want to use Caveman, see the
  524. Take Command/16 installation instructions in TCMD.TXT, which explain how
  525. to add the line for CAVEMAN.386 manually.
  526.       endtext
  527.       wait
  528.  
  529.    case TCMD32
  530.       clear
  531.       :: Registry stuff only works in Win95 or NT 4.0
  532.       iff ((%_dos eq WIN95 .or. %_dos eq WIN98) .or. (%_dos eq WIN32 .and. %_dosver ge 4.00)) then
  533.          iff exist jpsoft.inf then
  534.             clear
  535.             text
  536. The installation software can create a JP Software program group for
  537. Take Command/32, accessible through the Start menu.  The group will
  538. include shortcuts to start Take Command/32 itself, and the Take
  539. Command/32 help.  The same process creates a desktop shortcut for Take
  540. Command/32 (easily deleted if you prefer to use only the Start menu).
  541.  
  542. The JP Software group and related desktop shortcuts will also be made
  543. removable using Windows' Uninstall facility (available from the Control
  544. Panel's Add / Remove Programs item).
  545.  
  546. If you choose not to create these items now, you can create shortcuts
  547. manually as described in the TCMD32.TXT file, in the chapter on
  548. installing Take Command/32.
  549.             endtext
  550.             yesno yn Create a program group and desktop shortcuts%=nfor Take Command/32
  551.             iff "%yn" == "Y" then
  552.                instinf %[cd]jpsoft.inf
  553.                echo.
  554.                echo The program group and shortcuts have been created.
  555.                wait
  556.             endiff
  557.          endiff
  558.  
  559.          iff exist jptcmd32.inf then
  560.             clear
  561.             text
  562. The installation software can install optional registry extensions for
  563. Take Command/32.  The registry extensions customize a few Windows
  564. functions to take advantage of features provided by Take Command/32.
  565. Specifically, they:
  566.  
  567.    - Create a new "Take Command/32 Prompt" in the context menu of drives
  568.      and directories, to launch Take Command in that drive or directory.
  569.  
  570.    - Extend Windows' definition of a "batch file" to include BTM files.
  571.  
  572.    - Provide an additional "open" option in the context menu of batch
  573.      files (.BAT, .CMD, and .BTM), to run the file with Take Command/32.
  574.  
  575. These registry extensions can be removed using Windows' Uninstall facility
  576. (available from the Control Panel under Add / Remove Programs).
  577.  
  578. If you choose not to install the registry extensions now, you can do so
  579. later as described in the TCMD32.TXT file, in the Take Command/32
  580. installation chapter.
  581.             endtext
  582.             yesno yn Install Take Command/32 registry extensions
  583.             iff "%yn" == "Y" then
  584.                instinf %[cd]jptcmd32.inf
  585.                echo.
  586.                echo The registry extensions have been installed.
  587.                wait
  588.             endiff
  589.          endiff
  590.       endiff
  591.  
  592.    case TCMDOS2
  593.       clear
  594.       text
  595. If you wish, the installation software can create an OS/2 desktop folder
  596. for Take Command for OS/2, including objects to start Take Command
  597. itself, and the Take Command help.  You can also create these objects
  598. manually as described in the TCMDOS2.TXT file, in the chapter on
  599. installing Take Command for OS/2.
  600.       endtext
  601.       yesno yn Create an OS/2 desktop folder for Take Command
  602.       iff "%yn" == "Y" then
  603.          callrexx jpos2ins.cmd "TCMD" "%cd" "CreateFolder"
  604.          wait
  605.       endiff
  606.  
  607. endswitch
  608.  
  609.  
  610. clear
  611. switch %base
  612.  
  613.    case TCMD .or. TCMD32
  614.       echo %product installation is complete.  To start %product, use
  615.       echo the shortcut or group created during the installation process.  If you
  616.       echo did not allow the installation software to create a shortcut you can
  617.       echo do so manually; instructions are in the %base.TXT file, in the chapter
  618.       echo on %product installation.
  619.  
  620.    case TCMDOS2
  621.       iff %csmod eq Y then
  622.          echo Take Command for OS/2 installation is complete.  Please reboot before
  623.          echo using Take Command, so that the changes made to paths in CONFIG.SYS can
  624.          echo take effect.
  625.       else
  626.          echo Take Command for OS/2 installation is complete.  You chose not to update
  627.          echo the system CONFIG.SYS file during the installation process.  When you
  628.          echo are ready, update CONFIG.SYS as described in the TCMDOS2.TXT file, then
  629.          echo reboot.
  630.       endiff
  631.  
  632. endswitch
  633.  
  634. goto exit_noretry
  635.  
  636.  
  637.  
  638. :on_error
  639. :nonfatalerr
  640. on errormsg
  641. on break
  642. echo.
  643. echo.
  644. echo *** The installation stopped due to the above error.  The installation
  645. echo     program will restart the next time you start Take Command.
  646. echo.
  647. goto done
  648.  
  649. :on_break
  650. on errormsg
  651. on break
  652. echo.
  653. echo.
  654. echo *** Installation interrupted.  The installation program will restart
  655. echo     the next time you start Take Command.
  656. echo.
  657. goto done
  658.  
  659. :fatalerr
  660. on errormsg
  661. on break
  662. echo.
  663. echo.
  664. echo *** Installation stopped due to the above error.
  665. echo.
  666. echo You will have to complete the installation manually.  For
  667. echo instructions see the chapter on %product installation
  668. echo in the %base.TXT file.
  669. echo.
  670.  
  671. :exit_noretry
  672. on errormsg
  673. on break
  674. set bname="%@full[%0]"
  675. move %bname "%@path[%bname]\%@name[%bname].btx" >& nul
  676.  
  677. :done
  678. on errormsg
  679. on break
  680. echo.
  681. pause Press any key to exit to the Take Command prompt ...
  682. cls
  683. endlocal
  684. *if %@index["%prompt",$e] ne -1 *prompt
  685. quit
  686.  
  687. :addslash
  688.     iff "%@right[1,%[%slashdir]]" eq "%=q" then
  689.         if "%@instr[%@eval[%@len[%[%slashdir]]-2],1,%[%slashdir]]" ne "\" set %slashdir="%@instr[1,%@eval[%@len[%[%slashdir]]-2],%[%slashdir]]\"
  690.     else
  691.         if "%@right[1,%[%slashdir]]" ne "\" set %slashdir=%[%slashdir]\
  692.     endiff
  693. return
  694.