home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / vid-in.zip / INSTINF.CMD next >
OS/2 REXX Batch file  |  1994-10-28  |  2KB  |  102 lines

  1. /* */
  2. '@echo off'
  3. cls
  4.  
  5. inf_file = 'VIDEOIN.INF'
  6. null     = '> nul'
  7. slash    = '\'
  8. say 'Starting The OS/2 RexxUtil Functions Please Wait...'
  9. say ' '
  10.  
  11. Call RxFuncadd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  12. Call SysLoadFuncs
  13. if RxFuncQuery('SysCls') <> 0 then do
  14.     say 'RexxUtil Functions Not Installed On This System!!!!!'
  15.     say 'Install Rexx Utilities And Then Rerun This Install Program.'
  16.     say ' '
  17.     exit
  18.     end
  19. else do
  20.     say 'RexxUtil Functions Started.'
  21.     say ' '
  22.     end
  23. /*
  24. find install cmd file location
  25. */
  26. rtn = setlocal()
  27. parse source na na drivepath
  28. foundl = lastpos('\',drivepath)
  29. found  = pos('\',drivepath)
  30. drivepath = left(drivepath,(foundl - 1))
  31. drive  = left(drivepath,(found - 1))
  32. drive
  33. 'cd' drivepath
  34.  
  35. say 'Searching for MMPM/2 directories'
  36. say ' '
  37. env      = 'OS2ENVIRONMENT'
  38. tst_path = value('PATH',,env)
  39. os2      = pos(':\OS2',tst_path)
  40. os2      = os2 - 1
  41. os2drv   = substr(tst_path,os2,2)
  42. mm       = pos(':\MMOS2',tst_path)
  43. mm       = mm - 1
  44.  
  45. if mm > 0 then do
  46.     Say 'MMPM/2 Directories Located.'
  47.     say ' '
  48.     mmdrive = os2drv
  49.     loc.1 = mmdrive||'\os2\book'
  50.     say 'Copying' inf_file 'File To' loc.1
  51.     say  ' '
  52.     'copy' drivepath||slash||inf_file loc.1 null
  53.     end
  54. else do
  55.     say 'MMPM/2 Not Installed.'
  56.     say ' '
  57.     mmdrive = os2drv
  58.     loc.1 = mmdrive||'\os2\book'
  59.     say 'Copying' inf_file 'File To' loc.1
  60.     say ' '
  61.     'copy' drivepath||slash||inf_file loc.1 null
  62.     end
  63.  
  64. title    ='Video In Users Guide'
  65. text     ='Multimedia Folder And Then Selecting The' title 'Icon.'
  66. classname='WPProgram'
  67. location ='<MMPM2_FOLDER>'
  68. setup=    'OBJECTID=<MMOS_VIN>;'||,
  69.           'EXENAME=view.exe;'||,
  70.           'parameters='||inf_file';'||,
  71.           'STARTUPDIR='loc.1';'
  72. call BldObj
  73.  
  74. If created \= 1 Then do
  75.     text    = title 'Icon.'
  76.     location='<WP_DESKTOP>'
  77.     call BldObj
  78.     end
  79.  
  80. if created = 1 then do
  81.     say ' '
  82.     say 'Installation Complete!'
  83.     say ' '
  84.     say 'The' inf_file 'File May Now Be Viewed On The Desktop By Selecting The'
  85.     say text
  86.     say ' '
  87.     end
  88. else
  89.     say 'Installation Failed Desktop Icon Could Not Be Created!!'
  90.  
  91. rtn = endlocal()
  92. exit
  93.  
  94. BldObj:
  95. say 'Building: DeskTop Icon(s).'
  96. created = SysCreateObject(classname, title, location, setup, 'F')
  97. If created=1 Then
  98.     say '...   Icon created!'
  99. say ' '
  100. Return
  101.  
  102.