home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / backres.zip / INSTDIR.CMD < prev    next >
OS/2 REXX Batch file  |  1998-01-27  |  1KB  |  33 lines

  1. /* -------------------------------------------------- */
  2. /* Title:               instdir.cmd                   */
  3. /*                                                    */
  4. /* Author:              J.Cobb                        */
  5. /*                                                    */
  6. /* Change History:      23/01/1998 - Created JAC      */
  7. /*                                                    */
  8. /* Function:            Sets the install dir 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. rc = RexxInstSetVariable(featurehandle,'InstalledDir',rest)
  30.  
  31. Exit
  32.  
  33.