home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / pbprn101.zip / PBPInst.cmd < prev    next >
OS/2 REXX Batch file  |  1995-08-23  |  2KB  |  70 lines

  1. /* Rexx program to install PhoneBoy Print */
  2. 'echo off'
  3.  
  4. call rxfuncadd 'sysloadfuncs','rexxutil','sysloadfuncs'
  5. call sysloadfuncs
  6.  
  7. parse arg parms
  8.  
  9. if parms = ""
  10.     Then
  11.         Do
  12.             'CLS'
  13.             Say ''
  14.             Say ''
  15.             Say 'ERROR!'
  16.             Say 'Incorrect or missing parameters'
  17.             Say 'Correct syntax is:  '
  18.             Say '     PBInst PBPrint_directory'
  19.             Return
  20.         End
  21.  
  22. parse var parms pbpDir
  23.  
  24. if right(pbpDir,1) <> '\'
  25.     Then pbpDir = pbpDir||'\'
  26.  
  27. /* Let's do the disclaimer stuff */
  28. 'CLS'
  29. Say ''
  30. Say ''
  31. Say 'By using this program, you are agreeing to accept'
  32. Say 'all risk for use of this program.'
  33. Say ''
  34. Say 'This means that YOU and YOU ALONE are responsible for'
  35. Say 'any and all problems that may arise from use of this software.'
  36. Say ''
  37. Say 'Do you agree to these terms? (Y/N):'
  38. pull agree
  39.  
  40. if agree <> 'Y'
  41.     Then Exit
  42.  
  43.  
  44. Say 'Do you really want to install PBPrint into 'pbpDir' (Y/N) ?'
  45. pull response
  46.  
  47. if response = 'Y'
  48.     Then
  49.         Do
  50.             'echo y|xcopy *.* '||pbpDir||'>NUL'
  51.  
  52.            call SysCreateObject 'WPProgram', 'PhoneBoy^Print', '<WP_DESKTOP>',';EXENAME='||pbpDir||'\PBPrint.Exe;STARTUPDIR='||pbpDir||';PROGTYPE=PM;OBJECTID=<PBPrint>',REPLACE
  53.         End
  54.  
  55. Say 'Installation completed successfully.'
  56.  
  57. Say 'Do you wish to read the ReadMe.Doc file now?'
  58. pull response
  59.  
  60. if response = 'Y'
  61.     Then
  62.         'type PBPrint.Doc|more'
  63.  
  64. Say 'Do you wish to print the PBPrint.Doc file now?'
  65. pull response
  66.  
  67. if response = 'Y'
  68.     Then
  69.         'print PBPrint.doc'
  70.