home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / swapm200.zip / sinstall.cmd < prev    next >
OS/2 REXX Batch file  |  1997-04-07  |  2KB  |  71 lines

  1. /*******************************************************\
  2. * SwapMonitor Monitor Installation                      *
  3. * Version 1.0                                           *
  4. * (c) BMT Micro                     All Rights Reserved.*
  5. \*******************************************************/
  6.  
  7. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  8. Call SysLoadFuncs
  9.  
  10. Parse Arg Directory
  11.  
  12. if Directory = "" then
  13.    do
  14.    r=Help();
  15.    exit;
  16.    end;
  17.  
  18. Call SysCls
  19.  
  20. Say
  21. Say 'Installing SwapMonitor'
  22.  
  23. 'md ' Directory ' 2> nul:'
  24. 'copy swapmon.exe '||Directory
  25. 'copy swapmon.hlp '||Directory
  26. 'copy swapmon.inf '||Directory
  27. 'copy swapdll.dll '||Directory
  28. 'copy order.frm '||Directory
  29. 'copy readthis.txt '||Directory
  30. 'copy file_id.diz '||Directory
  31.  
  32. Say;
  33. Say 'Creating SwapMonitor Desktop objects.';
  34. Say;
  35.  
  36. r = Call SysCreateObject("WPFolder","SwapMonitor","<WP_DESKTOP>","OBJECTID=<SWAPMON>","update")
  37.  
  38. if (r <> 0 ) then do
  39.  
  40.       r = Call SysCreateObject("WPProgram","SwapMonitor","<SWAPMON>",,
  41.                "EXENAME="||Directory||"\SWAPMON.EXE;STARTUPDIR="||Directory,"replace" );
  42.  
  43.       r = Call SysCreateObject("WPProgram","SwapMon Reference","<SWAPMON>",,
  44.                "EXENAME=VIEW.EXE;PARAMETERS="||Directory||"\SWAPMON.INF;STARTUPDIR="||Directory,"replace" );
  45.    end;
  46.  
  47. else do
  48.    say;
  49.    say   'There was an error while creating the SwapMonitor Folder ';
  50.    end;
  51.  
  52. Say 'SwapMonitor installation terminated.'
  53. Say
  54.  
  55. Exit
  56.  
  57. Help:
  58.       Say
  59.       Say
  60.       Say '     SwapMonitor Installation: '
  61.       Say
  62.       Say
  63.       Say 'Usage:    Select your target directory and specify it as'
  64.       Say '          parameter.'
  65.       Say
  66.       Say
  67.       Say 'Example:      SINSTALL C:\SWAPMON '
  68.       Say
  69.  
  70. Return 0;
  71.