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

  1. /* Begin Install.CMD for Fileman */
  2. '@Echo off'
  3. adummy = ''
  4. adummy = charout(,'Do you wish to continue with this install? [y/N] ')
  5. parse upper pull adummy
  6. if left(adummy,1) \= 'Y' then do
  7.   exit
  8. end
  9.  
  10. rc = stream('filemanp.exe','c','query exists')
  11. if rc = '' then
  12. do
  13.   say 'Sorry, Filemanp.Exe not found.  Must not be right directory. Terminating.'
  14.   exit
  15. end
  16. rc = stream('fileman.hlp','c','query exists')
  17. if rc = '' then
  18. do
  19.   say 'Sorry, Fileman.Hlp not found.  Must not be right directory. Terminating.'
  20.   exit
  21. end
  22.  
  23. rc = stream('english.dll','c','query exists')
  24. if rc = '' then
  25. do
  26.   say 'Sorry, English.Dll not found.  Must not be right directory. Terminating.'
  27.   exit
  28. end
  29.  
  30. rc = stream('german.dll','c','query exists')
  31. if rc = '' then
  32. do
  33.   say 'Sorry, German.Dll not found.  Must not be right directory. Terminating.'
  34.   exit
  35. end
  36.  
  37. curdir = directory()
  38.  
  39. do
  40.     say ''
  41.     say 'Please enter the drive letter to install FileMan (Ex. C:)'
  42.     say 'You MUST enter the full drive letter, C: <- Notice the colon'
  43.     say '--'
  44.     parse upper pull dummy
  45.     ADDRESS CMD dummy
  46.     ADDRESS CMD "CD\"
  47.     ADDRESS CMD "MD FileMan 2>NUL"
  48.     ADDRESS CMD "CD FileMan"
  49.     olddir = curdir
  50.     curdir = dummy'\FileMan'
  51.     say ''
  52.     say 'Current sub-directory: 'curdir
  53.     say ''
  54.     say 'Install FileMan into the current'
  55.     dum = charout(, 'sub-directory? [Y/n] ')
  56.     parse upper pull dummy
  57.     if left(dummy,1) = 'N' then exit
  58.     say ''
  59. end
  60.  
  61. say ''
  62. say 'Installing FileMan, copying files.. Please wait...'
  63.  
  64. InsCmd = copy olddir'\*>NUL'
  65.  
  66. if olddir \= curdir then
  67. do
  68.   ADDRESS CMD InsCmd
  69. end
  70.  
  71. say ''
  72. say 'Choose your favourite Language ...'
  73. say ''
  74. say 'G - German'
  75. say 'E - English'
  76. say ''
  77. dummy = charout(, 'Language [G/e] ? ')
  78. parse upper pull dummy
  79. if left(dummy,1) = 'G' then language = "GERMAN.DLL"
  80. if left(dummy,1) = 'E' then language = "ENGLISH.DLL"
  81. if left(dummy,1) = '' then language = "GERMAN.DLL"
  82. say ''
  83. InsCmd = copy olddir'\'language curdir'\FileMan.Dll>NUL'
  84. if olddir \= curdir then
  85. do
  86.   ADDRESS CMD InsCmd
  87. end
  88.  
  89.  
  90. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  91. call SysLoadFuncs
  92.  
  93.  
  94. say "Creating FileMan object..."
  95.  
  96. title = "FileManager for Adept"
  97. classname = 'WPProgram'
  98. location = '<WP_DESKTOP>'
  99. setup = 'EXENAME='curdir'\FileManP.Exe;STARTUPDIR='curdir''
  100. result=SysCreateObject(classname,title,location,setup,f)
  101.  
  102. '@filemanp.exe'
  103.  
  104. say 'Thank you for choosing FileMan!'
  105.  
  106.