home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac_os2 / vxftp041.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-06-14  |  3KB  |  106 lines

  1. /* REXX (Really EXtraordinary eXecutor) file to install VxFTP.EXE
  2.    Written: April 17, 1994, last revised May 26, 1994 
  3.    Author:  Howard Hyten
  4.  */
  5.  
  6. '@echo off'
  7.  
  8. if RxFuncQuery("SysLoadFuncs") then do
  9.     rc = RxFuncAdd("SysLoadFuncs", "RexxUtil", "SysLoadFuncs")
  10.     rc = SysLoadFuncs()
  11.     if (rc = 1) then do
  12.         say "You don't have the REXXUtil.DLL installed in your LIBPATH."
  13.         say "You must have these components loaded before VxFTP will run."
  14.         exit -1
  15.     end
  16. end
  17. call SysCls
  18.  
  19. do forever
  20.     say "Please enter the boot drive. [Example: C ]"
  21.     pull bootDrive
  22.     bootDrive = left(bootDrive, 1)
  23.     if (datatype(bootDrive) = 'CHAR') then do
  24.         call SysFileTree bootDrive":\config.sys", file., 'F'
  25.         if file.1 = "FILE.1" then do
  26.             say bootdrive "is not the Boot Drive. (Press Ctrl-Break to quit.)"
  27.         iterate
  28.     end
  29.         leave
  30.     end /* if */
  31.     else
  32.         say "Wrong.."
  33. end
  34.  
  35. do forever
  36.     say "What is your version of IBM TCP/IP?"
  37.     say "Type 1  for version 1.2.1; Type 2  for version 2.x"
  38.     pull TCPVer
  39.     select
  40.         when TCPVer = "1" then do
  41.             'copy rxftp.dll rxftp32.dll > nul'
  42.             'del rxftp.dll > nul'
  43.             'copy rxftp16.dll rxftp.dll > nul'
  44.             leave
  45.         end
  46.         when TCPVer = "2" then
  47.             leave
  48.         otherwise
  49.             say "You didn't properly answer."
  50.     end
  51. end
  52.  
  53. do forever
  54.     line_in = linein( bootdrive':\config.sys' )
  55.     if ( translate( left( line_in, 8)) = 'LIBPATH=' ) then
  56.     leave
  57. end
  58.  
  59. libpath = translate( line_in, "|", ";" )
  60. do until rest = ""
  61.     parse var libpath dir1 "|" rest
  62.     if ( translate( right( dir1, 9)) = 'TCPIP\DLL') then
  63.     leave
  64.     libpath = rest
  65. end
  66. say 'Copying rxftp.dll to' dir1
  67. 'copy rxftp.dll' dir1 '> nul'
  68. say 'Copying vrobj.dll to' bootdrive':\os2\dll'
  69. 'copy vrobj.dll' bootdrive':\os2\dll > nul'
  70.  
  71. call SysCls
  72.  
  73. say "Enter the full path of the directory where you want to install VxFTP."
  74. say "Be sure to include the drive as well."
  75. say "(Press return for a default of C:\VxFTP)"
  76. parse pull target1
  77. if ( target1 = "" ) then
  78.     target1 = "C:\VxFTP"
  79.  
  80. call SysMkDir target1
  81. 'copy vxftp.exe' target1 '> nul'
  82. 'copy vxftp.ini' target1 '> nul'
  83. 'copy vxftp.ico' target1 '> nul'
  84.  
  85. setupString = "OBJECTID=<VxFTP>;"||,
  86.               "EXENAME="||target1||"\vxftp.exe;"||,
  87.               "ICONFILE="||target1||"\vxftp.ico;"||,
  88.               "PROGTYPE=PM;"
  89.  
  90. if SysCreateObject("WPProgram", "VxFTP v0.41", ,
  91.                    "<WP_DESKTOP>", setupString, "R")
  92. then do
  93.     say "An VxFTP object was created on your Desktop."
  94.     say "Just double-click the object to start."
  95. end
  96. else
  97.     say "Couldn't create an VxFTP object on your Desktop."
  98.  
  99. say ""
  100. say "For the Unzip feature to work, InfoZIP's Unzip"
  101. say "must be in your PATH."
  102.  
  103. /* Bring the Readme file up into the E editor */
  104. 'start e readme'
  105.  
  106. exit 0