home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Backup / Backup.zip / bacrest.zip / instdriv.cmd < prev    next >
OS/2 REXX Batch file  |  1999-10-05  |  1KB  |  34 lines

  1. /* -------------------------------------------------- */
  2. /* Title:               instdrv.cmd                   */
  3. /*                                                    */
  4. /* Author:              J.Cobb                        */
  5. /*                                                    */
  6. /* Change History:      23/01/1998 - Created JAC      */
  7. /*                                                    */
  8. /* Function:            Sets the install drive default*/
  9. /* -------------------------------------------------- */
  10.  
  11.  
  12. Parse arg featurehandle prodini path_key
  13.  
  14. /* Query the FI functions */
  15. if RxFuncQuery(RexxInstSetVariable) <> 0 then
  16.    if RxFuncAdd(RexxInstSetVariable,WPINSTAL,RexxInstSetVariable) <> 0 then Exit
  17.  
  18. if RxFuncQuery(Sysloadfuncs) <> 0 then
  19.    if RxFuncAdd(Sysloadfuncs,REXXUTIL,Sysloadfuncs) <> 0 then Exit
  20. Call SysloadFuncs
  21.  
  22. /* First We query OS2.ini file to see if psns is already installed  */
  23. /* If it is we set the FI variables so that it defaults to install over it */
  24.  
  25. path=Sysini('USER',prodini,path_key)
  26. if path = 'ERROR:' then Exit
  27.  
  28. parse var path drive ':' rest
  29. drive = drive || ':'
  30. rc = RexxInstSetVariable(featurehandle,'InstalledDrive',drive)
  31.  
  32. Exit
  33.  
  34.