home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / rneto100.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1999-02-14  |  3KB  |  107 lines

  1. /* REXX file to install the DH-Grep-PM on the desktop     */
  2. /* if you use this script as a starting point for your   */
  3. /* own install script and make improvements, please send */
  4. /* me a copy ---  dwhawk@southwind.net                   */
  5.  
  6. call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
  7. call sysloadfuncs                /* register system functions */
  8. address cmd '@echo off'          /* echo is turned off */
  9.  
  10. call SysCLS
  11.  
  12. say "RacerNet installation"
  13. say "Enter destination drive and directory"
  14. say "For example, C:\RACERNET"
  15. say "Hint:  If you already have NetLookout installed, install RacerNet in the same directory, so you won't have two copies of the DLL files."
  16. say "To install in the curent directory just press enter"
  17.  
  18. pull dest
  19. call setup_dir(dest) 
  20. call copy_files
  21. call MKOBJ
  22. say "**************************************"
  23. say "**************************************"
  24. say " "
  25. say "You must add the line"
  26. say " "
  27. say " SET USE_HOSTS_FIRST=1"
  28. say " "
  29. say "to your config.sys file"
  30. say "for RacerNet to work correctly."
  31. say " "
  32. say "After adding this to your config.sys file, you must re-boot."
  33. say " "
  34. say "**************************************"
  35. say "**************************************"
  36. exit
  37.  
  38. check_ok:
  39.   say  'Okay to continue(Y/n) ? '        
  40.   k = SysGetKey('NOECHO') 
  41.   if k = 'Y' | k = 'y'  then return
  42.   say 'halting'
  43.     exit
  44.  
  45.  
  46. mkdir:  /* Procedure for creating dir */
  47.   Parse Arg dir
  48.   rc = SysMkDir(dir)
  49.   If (rc = 0 | rc = 5) Then Return
  50.   Say 'Problem creating destination directory "'dir'"'
  51.   Exit
  52.  
  53.  
  54. MKOBJ:
  55. Settings = 'EXENAME='direct||'\rcneto.exe;'
  56. Settings = Settings||'PROGTYPE=PM;MINIMIZED=NO;'
  57. Settings = Settings||'CCVIEW=YES;'
  58. Settings = Settings||'STARTUPDIR='||direct';'
  59. rc=SysCreateObject('WPProgram','RacerNet','<WP_DESKTOP>',Settings,'R');
  60.  
  61. if rc = 1 then Say "RacerNet installed on desktop"
  62. return
  63.  
  64. setup_dir:      /* accept install path and create it if needed */
  65.                 /* the desired install path is in ARG(1) */
  66.                 /* if no path is specified current directory is used*/
  67.  
  68. Parse Arg destin  /* parameter of setup_dir */
  69.  
  70. save_dest = destin    /*  save original destin to */
  71.                       /*  determine if copy needed */
  72.  
  73. If destin = "" Then destin = Directory()
  74.  
  75. Say "Shall I install in "destin" ?"
  76. Call Check_Ok  /* your check routine */
  77.  
  78. Parse Var destin direct ':\' destin   /* get drive name only */
  79. direct=direct':'
  80.  
  81. Do Until destin = ""     /* No matter how many sub dirs present */
  82.   Parse Var destin sub '\' destin
  83.   direct=direct'\'sub
  84.   Call mkdir direct
  85. End
  86. return
  87.  
  88. copy_files:
  89. if save_dest \= ""  then do
  90.    'COPY rcneto.exe' direct
  91.    'COPY frugrsrc.dll' direct
  92.    'COPY frugm30.dll' direct
  93.    'COPY frugob3.dll' direct
  94.    'COPY frugou3.dll' direct
  95.    'COPY readme.txt' direct
  96.    'COPY register.txt' direct
  97.    'COPY help.htm' direct
  98.    'COPY rnet0.gif' direct
  99.    'COPY rnet5.gif' direct
  100.    'COPY rnet8.gif' direct
  101.    'COPY rnet3.gif' direct
  102.    'COPY rnet4.gif' direct
  103.  
  104. end
  105. return
  106.  
  107.