home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / pmdcopy.zip / install.cmd next >
OS/2 REXX Batch file  |  1993-04-12  |  1KB  |  53 lines

  1. /* Installation script for PM DCopy.
  2.  * - J.R.Shannon 1992, 1993.
  3.  */
  4.  
  5. CALL rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  6. CALL sysloadfuncs
  7.  
  8. SAY 'Please enter the full pathname of the directory into which you'
  9. SAY 'would like PM DCopy to be installed (eg. C:\FILES\APPS\PMDCOPY)'
  10. PULL DestDir
  11.  
  12. IF DestDir = "" THEN
  13.   DestDir = 'C:\OS2\APPS'
  14.  
  15. rc = SysFileTree(DestDir, 'Dirs', 'D')
  16.  
  17. IF Dirs.0 = 0 THEN
  18.   CALL SysMkDir DestDir
  19.  
  20. SAY 'Do you want a PM DCopy program object created on the desktop? (Y/N)'
  21. PULL response
  22.  
  23. IF response = "Y" THEN
  24.   folder = '<WP_DESKTOP>'
  25. ELSE
  26. DO
  27.   say 'You will have to add' destdir 'to your PATH in config.sys then.'
  28.   folder = ''
  29. END
  30.  
  31. '@copy pmdcopy.exe' destdir
  32. '@copy pmdcopy.hlp' destdir
  33.  
  34. IF folder = "" THEN nop; ELSE
  35. DO
  36.   SAY 'Creating program object...'
  37.  
  38.   Type='WPProgram'
  39.   Title='PM DCopy'
  40.   Parms='MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='DestDir'\PMDcopy.exe;STARTUPDIR='DestDir';OBJECTID=<PMDCOPY>;NOPRINT=YES'
  41.         
  42.   rc = SysCreateObject(Type, Title, Folder, Parms)
  43.  
  44.   IF rc = 1 THEN
  45.     SAY 'Desktop object created...'
  46.   ELSE
  47.     SAY 'Desktop creation failed - rc =' rc
  48. END
  49.  
  50. SAY 'Installation complete...'
  51.  
  52.  
  53.