home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / updwebsu.exe / rsuwp.cmd < prev    next >
OS/2 REXX Batch file  |  1996-11-08  |  2KB  |  63 lines

  1. /**********************************************************/
  2. /* Create Desktop object to connect to SOFTUPD html page. */
  3. /* Build for IBM Web Explorer or Netscape Navigator.      */
  4. /**********************************************************/
  5. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  6. call SysLoadFuncs
  7. found=0
  8. Arg which .
  9. Select
  10. When which='WEBX' then
  11.   Do
  12.     expl=SysSearchPath('PATH','EXPLORE.EXE')
  13.     If expl='' then
  14.       Do
  15.         Say 'EXPLORE.EXE not found anywhere in your PATH, cannot continue.'
  16.         Signal Done
  17.       End
  18.     found=1
  19.     title='Software Updates^via IBM Web Explorer'
  20.     objid='<WP_SRVUPW>'
  21.   End
  22. When which='NETSCAPE' then
  23.   Do
  24.     x=SysIni('USER','ALL:','apps.')
  25.     Do j=1 to apps.0
  26.       If translate(apps.j)='NETSCAPE' then
  27.         Do
  28.           x=SysIni('USER',apps.j,'ALL:','key.')
  29.           expl=SysIni('USER',apps.j,key.1)||'\NETSCAPE.EXE'
  30.           title='Software Updates^via Netscape Navigator'
  31.           objid='<WP_SRVUPN>'
  32.           found=1
  33.           Leave j
  34.         End
  35.     End
  36.   End
  37. Otherwise
  38.   Do
  39.     Say 'Invalid request ('which').'
  40.     Signal Done
  41.   End
  42. End
  43.  
  44. /**********************************/
  45. /* Create object if browser found */
  46. /**********************************/
  47. If found then
  48.   Do
  49.     classname = 'WPProgram'
  50.     title     =title
  51.     location  ='<WP_DESKTOP>'
  52.     setup     ='OBJECTID='objid';'||,
  53.       'PARAMETERS=http://ps.boulder.ibm.com/softupd.html;'||,
  54.       'PROGTYPE=PM;'||,
  55.       'EXENAME='expl';'
  56.     If SysCreateObject(classname,title,location,setup, 'UPDATE')=1 then
  57.       Say 'Created "'title'" program object on your desktop.'
  58.     Else
  59.       Say 'Unable to create "'title'" program object on your desktop.'
  60.   End
  61. Done:
  62. Exit
  63.