home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / modemwar.zip / Install.CMD next >
OS/2 REXX Batch file  |  1999-02-02  |  2KB  |  59 lines

  1. /* Modem Warrior v1.00 Installation */
  2. call RxFuncAdd 'SysCls','RexxUtil','SysCls'
  3.  
  4. call SysCls    /* Clear the screen */
  5.  
  6. say "Modem Warrior v1.00 Install"
  7. say "Copyright (C) 1999 Davy Jones Software Locker"
  8. say ""
  9. say "This process will install Modem Warrior v1.00 onto your system."
  10. say ""
  11. say "Davy Jones Software Locker - Making it all make copies"
  12. say ""
  13. say "Enter the target drive and directory"
  14. say "(Default=C:\ModemWar)"
  15. Target=""
  16. pull Target
  17. if Target="" then Target="C:\MODEMWAR"
  18.  
  19. Source=DIRECTORY()
  20.  
  21. /* Check to see if directory already exists */
  22. if \(Target=DIRECTORY(Target)) then
  23. do
  24.  
  25.     call RxFuncAdd 'SysMkDir','RexxUtil','SysMkDir'
  26.  
  27.     RetCode=SysMkDir(Target)
  28.     if(RetCode) then
  29.     do
  30.         say "Cannot create directory"Target
  31.         exit
  32.     end
  33. end
  34. Source=DIRECTORY(Source)
  35.  
  36. /* Now copy files over */
  37. "copy ModemWar.exe" Target
  38. "copy ModemWar.doc" Target
  39. "copy Install.cmd" Target
  40.  
  41. /* Copying complete.  Ask for installation of desktop object */
  42. say "Would you like to install a program object (Y/N)?"
  43. pull Response
  44. if(Response="y" | Response="Y") then
  45. do
  46.     say "Which COM port would you like to use?"
  47.     pull ComPort
  48.     if ComPort="" then ComPort="COM2"
  49.  
  50.     /* Install Modem Warrior object */
  51.     call RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
  52.  
  53.     Crap=SysCreateObject("WPProgram","Modem Warrior", "<WP_DESKTOP>",,
  54.           "EXENAME="Target"\ModemWar.exe;PARAMETERS=-c"ComPort, "replace")
  55. end
  56. e ModemWar.doc
  57. say "Modem Warrior Installation complete!"
  58. exit
  59.