home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / adm098wb.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1996-05-04  |  2KB  |  92 lines

  1. /* Begin Install.CMD for Adeptmail */
  2. '@Echo off'
  3. '@cls'
  4. say ""
  5. say ""
  6. say "This is the Install-Routine of AdeptMail Version 0.98wb"
  7. say ""
  8. adummy = ''
  9. adummy = charout(,'Do you wish to continue with this install? [y/N] ')
  10. parse upper pull adummy
  11. if left(adummy,1) \= 'Y' then do
  12.   exit
  13. end
  14.  
  15. rc = stream('adeptmail.exe','c','query exists')
  16. if rc = '' then
  17. do
  18.   say 'Sorry, AdeptMail.Exe not found.  Must not be right directory. Terminating.'
  19.   exit
  20. end
  21.  
  22. rc = stream('adeptmail.hlp','c','query exists')
  23. if rc = '' then
  24. do
  25.   say 'Sorry, AdeptMail.Hlp not found.  Must not be right directory. Terminating.'
  26.   exit
  27. end
  28.  
  29. rc = stream('adeptmail.ctl','c','query exists')
  30. if rc = '' then
  31. do
  32.   say 'Sorry, AdeptMail.Ctl not found.  Must not be right directory. Terminating.'
  33.   exit
  34. end
  35.  
  36. curdir = directory()
  37.  
  38. do
  39.     say ''
  40.     say 'Please enter the drive letter to install AdeptMail (Ex. C:)'
  41.     say 'You MUST enter the full drive letter, C: <- Notice the colon'
  42.     say ''
  43.     dummy = charout(,'Your choice : ')
  44.     parse upper pull dummy
  45.     ADDRESS CMD dummy
  46.     ADDRESS CMD "CD\"
  47.     say ''
  48.     say 'Please enter the pathname to install AdeptMail (Ex. \AdeptMail)'
  49.     say 'You MUST enter the full pathname, \AdeptMail <- Notice the leading backslash'
  50.     say ''
  51.     dummypath = charout(,'Your choice : ')
  52.     parse upper pull dummypath
  53.     ADDRESS CMD "MD" dummypath "2>NUL"
  54.     ADDRESS CMD "CD" dummypath
  55.     olddir = curdir
  56.     curdir = dummy || dummypath
  57.     say ''
  58.     say 'Current sub-directory: 'curdir
  59.     say ''
  60.     dum = charout(, 'Install AdeptMail into the current sub-directory? [Y/n] ')
  61.     parse upper pull dummy
  62.     if left(dummy,1) = 'N' then exit
  63.     say ''
  64. end
  65.  
  66. say ''
  67. say 'Installing AdeptMail, copying files.. Please wait...'
  68.  
  69. InsCmd = copy olddir'\*>NUL'
  70.  
  71. if olddir \= curdir then
  72. do
  73.   ADDRESS CMD InsCmd
  74. end
  75.  
  76. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  77. call SysLoadFuncs
  78.  
  79.  
  80. say "Creating AdeptMail object..."
  81.  
  82. title = "AdeptMail for AdeptXBBS"
  83. classname = 'WPProgram'
  84. location = '<WP_DESKTOP>'
  85. setup = 'EXENAME='curdir'\AdeptMail.Exe;STARTUPDIR='curdir''
  86. result=SysCreateObject(classname,title,location,setup,f)
  87.  
  88. '@AdeptMail.exe'
  89.  
  90. say 'Thank you for choosing AdeptMail!'
  91.  
  92.