home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKINST.CMD next >
OS/2 REXX Batch file  |  1995-04-10  |  2KB  |  54 lines

  1. /* This command file call the actual install in setup directory */
  2.  
  3. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. call SysLoadFuncs
  5. call SysCls
  6. /*
  7.    Find out the bootdrive from the path and then delete the EPF* files
  8.    from OS2/SYSTEM   directory
  9. */
  10.  
  11.  result = SysDestroyObject('<DDKI_B_FOLDER>')
  12.  
  13.  path = value('PATH',,'OS2ENVIRONMENT')
  14.  
  15.  if pos(':\OS2\SYSTEM', path) > 1 then
  16.     Parse Upper var path . ":\OS2\SYSTEM" -1 bootdrive +1 .
  17.  else bootdrive = 'C'
  18.  bootpath= bootdrive':\os2\system'
  19.  
  20. call SysIni bootpath'\epfis.ini','EPFINST_IBM Device Driver Source Kit for OS/2_71G3703-01_', 'DELETE:'
  21. call SysIni bootpath'\epfis.ini','EPFINST_IBM Device Driver Source Kit for OS/2_71G3703_', 'DELETE:'
  22. call SysIni bootpath'\epfis.ini','EPFINST_IBM Device Driver Source Kit for OS/2_71G3703_5892', 'DELETE:'
  23. call SysIni bootpath'\epfis.ini','EPFINST_OS/2 Device Driver Development Kit_0_0', 'DELETE:'
  24. USER1=bootpath'\epfis.ini'
  25. Version=SysIni(USER1,"EPFINST_IBM Developer Connection Device Driver Kit for OS/2_83G9641_","Version")
  26. oldver =  LEFT(Version,4)
  27.  
  28. /* This entry has to be changed everytime a new version is shipped */
  29. curver="0200"
  30.  
  31. retcode=compare(oldver,curver)
  32. if retcode<>'0'
  33. then
  34.   DO
  35.    call SysIni bootpath'\epfis.ini','EPFINST_IBM Developer Connection Device Driver Kit for OS/2_83G9641_','DELETE:'
  36.    Call MAIN_INST
  37.   END
  38. ELSE
  39.    Call MAIN_INST
  40. EXIT
  41.  
  42.  
  43. MAIN_INST:
  44. parse source . . cmd_source .
  45. current_directory = directory()
  46. call directory FILESPEC( 'Drive', cmd_source ) || FILESPEC( 'Path', cmd_source ) || 'DDKx86\setup'
  47.  
  48. '@INSTALL'
  49.  
  50. call directory current_directory
  51.  
  52. return
  53.  
  54.