home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 January / VPR9701B.ISO / ibm_os / csd / wx00001 / cidserv.cmd next >
OS/2 REXX Batch file  |  1996-02-29  |  1KB  |  55 lines

  1. /* */
  2. trace off;
  3. parse source . . myname;
  4. '@echo off';
  5.  
  6. /*
  7.  * Set variables
  8.  */
  9. gv.copy   = 'copy';
  10. gv.unpack = 'unpack2.exe';
  11. gv.false  = 0;
  12. gv.true   = 1;
  13. retcode   = gv.false;
  14.  
  15. /*
  16.  * Erase following files after CID service
  17.  */
  18. gv.del_list = 'service2.cmd unpack2.exe chgattr.exe csdwprf.dll csdcmd.exe';
  19. gv.del_list = gv.del_list 'attrib.exe os2\dll\csfinit.exe csfkill.exe';
  20. gv.del_list = gv.del_list 'svgaid.exe csfkick.cmd xcsfkick.cmd rplserv2.cmd';
  21. gv.del_list = gv.del_list 'csfcrc.exe csffchk.cmd xcsfinit.cmd xcsflchk.cmd';
  22.  
  23. /*
  24.  * Get environment vector
  25.  */
  26. rc = setlocal();
  27. gv.source = value('csd_source',,'OS2ENVIRONMENT');
  28. gv.target = value('csd_target',,'OS2ENVIRONMENT');
  29. gv.boot   = value('csd_boot',,'OS2ENVIRONMENT');
  30.  
  31. /*
  32.  * Set-up the environment for SERVICE facility
  33.  */
  34. gv.copy   gv.source || '\unpack2.exe' gv.target || '\ 1>NUL 2>NUL';
  35. gv.copy   gv.source || '\csdcmd.exe'  gv.target || '\ 1>NUL 2>NUL';
  36. gv.copy   gv.source || '\csdinst.exe' gv.target || '\os2\install 1>NUL 2>NUL';
  37. gv.unpack gv.source || '\csdtools'    gv.target || '\ /P 1>NUL 2>NUL';
  38.  
  39. /*
  40.  * Main execution
  41.  */
  42. rc = directory(gv.target);
  43.  
  44. if gv.boot <> 'A:' then retcode = xcsfkick();
  45.                    else retcode =  csfkick();
  46.  
  47. do ii = 1 to words(gv.del_list);
  48.    del_file = gv.target || '\' || word(gv.del_list,ii);
  49.    'del' del_file '1>NUL 2>NUL';
  50. end;
  51.  
  52. rc = endlocal();
  53.  
  54. exit retcode;
  55.