home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / videotlk.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  2000-05-24  |  20KB  |  611 lines

  1. /* Video Toolkit For OS/2 Installation Script.            */
  2. /* Copyright (c) Abbotsbury Software Ltd. (UK), 1995-2000 */
  3. echo off
  4. parse arg drivedir
  5.  
  6.  
  7. if drivedir = ''
  8. then do
  9.      say 'You must enter a drive letter and directory name.'
  10.      say 'This directory will be the root directory for the toolkit.'
  11.      say 'For example :-'
  12.      say '    install C:\VIDTLKT'
  13.      say ''
  14.      Exit 0
  15. end
  16.  
  17. say 'This is the 24th May 2000 release of the Video Capture Adapter SDK'
  18. say 'If you have any comments or feedback please contact us on :'
  19. say 'os2tv-support@os2tv.com'
  20. say 'This latest release supports the 32 bit version APIs'
  21. say 'Good Luck - tim@wdi.co.uk'
  22.  
  23.  
  24. /* Load the REXX utility */
  25. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  26. Call SysLoadFuncs
  27.  
  28. rc = RXFUNCADD('mciRxInit','MCIAPI','mciRxInit')
  29. InitRC = mciRxInit()
  30.  
  31.                                 /* query number of celebrities, prisms, etc */
  32. m = 2
  33. celebs  = 0
  34. prisms  = 0
  35. highqs  = 0
  36. encores = 0
  37. wcasts  = 0
  38. stubs   = 0
  39. DO FOREVER
  40.         cmd = 'info digitalvideo0'm 'product wait'
  41.         rc = SendString(cmd, ret_str)
  42.  
  43.         if rc <> 0 then leave
  44.         if ret_str = "Hauppauge Celebrity" then celebs = celebs + 1
  45.         if ret_str = "Hauppauge Prism" then prisms = prisms + 1
  46.         if ret_str = "Hauppauge HighQ" then highqs = highqs + 1
  47.         if ret_str = "Hauppauge Encore" then encores = encores + 1
  48.         if ret_str = "Hauppauge WinCast TV" then wcasts = wcasts + 1
  49.         say "Driver found for - " ret_str
  50.         m = m + 1
  51. END
  52. num_tvs = celebs + prisms + highqs + stubs + encores + wcasts
  53.  
  54. say "There are" celebs "Celebs Installed"
  55. say "There are" prisms "Prisms Installed"
  56. say "There are" highqs "Highqs Installed"
  57. say "There are" encores "Encores Installed"
  58. say "There are" wcasts "WinCasts Installed"
  59.  
  60. if num_tvs = 0
  61. then do
  62.     say ""
  63.     say "Could not find any installed Video Capture Drivers"
  64.     say "Install a Video Capture Driver before this toolkit"
  65.     exit 0
  66. end
  67.  
  68. fspec = SysSearchPath( 'MMBASE', 'MMPM2.INI')
  69. if fspec = ''
  70. then do
  71.      say 'MMBASE Environment variable not found.'
  72.      say 'Install Multimedia before installing the Video Toolkit For OS/2.'
  73.      Exit 0
  74. end
  75.  
  76. len = LENGTH(fspec)
  77. l = len - 10
  78. mmbase = SUBSTR(fspec, 1, l)
  79.  
  80. /* Make sure the proper directories have been created and copy   */
  81. /* the required files to those directories.                      */
  82. Call SysMkDir drivedir
  83. Call SysMkDir drivedir'\BIN'
  84. COPY 'BIN\*.*' drivedir'\BIN'
  85. Call SysMkDir drivedir'\BOOK'
  86. COPY 'BOOK\*.*' drivedir'\BOOK'
  87. Call SysMkDir drivedir'\DLL'
  88. COPY 'DLL\*.*' mmbase'\DLL'
  89. COPY 'DLL\*.*' drivedir'\DLL'
  90. Call SysMkDir drivedir'\HELP'
  91. COPY 'HELP\*.*' mmbase'\HELP'
  92. COPY 'HELP\*.*' drivedir'\HELP'
  93. Call SysMkDir drivedir'\H'
  94. COPY 'H\*.*' drivedir'\H'
  95. Call SysMkDir drivedir'\LIB'
  96. COPY 'LIB\*.*' drivedir'\LIB'
  97. Call SysMkDir drivedir'\SAMPLES'
  98. Call SysMkDir drivedir'\SAMPLES\DIAG'
  99. Call SysMkDir drivedir'\SAMPLES\EX1'
  100. Call SysMkDir drivedir'\SAMPLES\EX2'
  101. Call SysMkDir drivedir'\SAMPLES\EX3'
  102. Call SysMkDir drivedir'\SAMPLES\EX4'
  103. Call SysMkDir drivedir'\SAMPLES\CAM'
  104. COPY 'SAMPLES\DIAG\*.*' drivedir'\SAMPLES\DIAG'
  105. COPY 'SAMPLES\EX1\*.*' drivedir'\SAMPLES\EX1'
  106. COPY 'SAMPLES\EX2\*.*' drivedir'\SAMPLES\EX2'
  107. COPY 'SAMPLES\EX3\*.*' drivedir'\SAMPLES\EX3'
  108. COPY 'SAMPLES\EX4\*.*' drivedir'\SAMPLES\EX4'
  109. COPY 'SAMPLES\CAM\*.*' drivedir'\SAMPLES\CAM'
  110. if wcasts > 0 then do
  111.     Call SysMkDir drivedir'\SAMPLES\DIVE'
  112.     COPY 'SAMPLES\DIVE\*.*' drivedir'\SAMPLES\DIVE'
  113. end
  114. COPY '*.*' drivedir
  115.  
  116. if SysCreateObject( 'WPFolder', 'Video Toolkit For OS/2', '<WP_DESKTOP>',,
  117.                     'OBJECTID=<ABBVIDFolder>;ICONFILE='drivedir'\BIN\WKLOGO.ICO')
  118. then do
  119.      say 'Video Toolkit For OS/2 Folder created sucessfully.'
  120. end
  121. else do
  122.      say 'Error creating Video Toolkit For OS/2 Folder.'
  123. /*     Exit 0 */
  124. end
  125.  
  126. if SysCreateObject( 'WPFolder', 'Information', '<ABBVIDFolder>',,
  127.                     'OBJECTID=<ABBINFFolder>;ICONFILE='drivedir'\BIN\ICONINFO.ICO')
  128. then do
  129.      say 'Information Folder created sucessfully.'
  130.      if SysCreateObject( 'WPProgram', 'Video Toolkit For OS/2 Technical Reference', '<ABBINFFolder>',,
  131.  'EXENAME=VIEW.EXE;PARAMETERS=VIDTLKT;STARTUPDIR='drivedir'\BOOK;OBJECTID=<ABBVIEWVIDTLKT>')
  132.      then do
  133.           say 'View created successfully'
  134.      end
  135.      else do
  136.           say 'Error creating View'
  137.           Exit 0
  138.      end
  139. end
  140. else do
  141.      say 'Error creating Information Folder.'
  142.      Exit 0
  143. end
  144.  
  145. if SysCreateObject( 'WPFolder', 'Samples', '<ABBVIDFolder>',,
  146.                     'OBJECTID=<ABBSAMPFolder>')
  147. then do
  148.     say 'Samples Folder created sucessfully.'
  149.     Instance = 1
  150.     Video='CELEB'
  151.     if celebs > 0 then
  152.     do
  153.     do until Instance = celebs + 1
  154.  
  155.         rc = InstallEx('DIAG')
  156.         rc = InstallEx('EX1')
  157.         rc = InstallEx('EX2')
  158.         rc = InstallEx('EX3')
  159.         rc = InstallEx('EX4')
  160.         Instance = Instance + 1
  161.     end
  162.     end
  163.     Instance = 1
  164.     Video='PRISM'
  165.     if prisms > 0 then
  166.     do
  167.     do until Instance = prisms + 1
  168.  
  169.         rc = InstallEx('DIAG')
  170.         rc = InstallEx('EX1')
  171.         rc = InstallEx('EX2')
  172.         rc = InstallEx('EX3')
  173.         rc = InstallEx('EX4')
  174.         Instance = Instance + 1
  175.     end
  176.     end
  177.     Instance = 1
  178.     Video='HIGHQ'
  179.     if highqs > 0 then
  180.     do
  181.     do until Instance = highqs + 1
  182.  
  183.         rc = InstallEx('DIAG')
  184.         rc = InstallEx('EX1')
  185.         rc = InstallEx('EX2')
  186.         rc = InstallEx('EX3')
  187.         rc = InstallEx('EX4')
  188.         Instance = Instance + 1
  189.     end
  190.     end
  191.     Instance = 1
  192.     Video='WCAST'
  193.     if wcasts > 0 then
  194.     do
  195.     do until Instance = wcasts + 1
  196.  
  197.         rc = InstallEx('DIAG')
  198.         rc = InstallEx('EX1')
  199.         rc = InstallEx('EX2')
  200.         rc = InstallEx('EX3')
  201.         rc = InstallEx('EX4')
  202.         rc = InstallEx('DIVE')
  203.         Instance = Instance + 1
  204.     end
  205.     end
  206.     if SysCreateObject( 'WPProgram', 'Samples Directory', '<ABBSAMPFolder>',,
  207.             'EXENAME=*;STARTUPDIR='drivedir'\SAMPLES;PROGTYPE=FULLSCREEN;OBJECTID=<ABBOS2>')
  208.     then do
  209.          say 'Samples Directory created successfully'
  210.     end
  211.     else do
  212.          say 'Error creating Samples Directory'
  213.          Exit 0
  214.     end
  215. end
  216. else do
  217.         say 'Error creating Samples Folder.'
  218. end
  219.  
  220. if SysCreateObject( 'WPFolder', 'Utilities', '<ABBVIDFolder>',,
  221.                     'OBJECTID=<ABBUTILFolder>')
  222. then do
  223.     say 'Utilities Folder created sucessfully.'
  224.     n = 1
  225.     if celebs > 0 then
  226.     do
  227.     do until n = celebs + 1
  228.         if SysCreateObject( 'WPProgram', 'PMTV/2 Celeb 'n, '<ABBUTILFolder>',,
  229. 'EXENAME='drivedir'\BIN\PMTV2.EXE;PARAMETERS=CELEB 'n';OBJECTID=<ABBPMTV2CEL'n'>')
  230.         then do
  231.              say 'PMTV/2 Celeb 'n' created successfully'
  232.              file1 = drivedir'\BIN\PMTV2.EXE'
  233.              file2 = drivedir'\BIN\PMTV2.ICO'
  234.              rc = SysSetIcon( file1, file2)
  235.         end
  236.         else do
  237.              say 'Error creating PMTV/2 Celeb 'n
  238.              Exit 0
  239.         end
  240.         if SysCreateObject( 'WPProgram', 'Celeb 'n' Config', '<ABBUTILFolder>',,
  241. 'EXENAME='drivedir'\BIN\TV2CFG.EXE;PARAMETERS=CELEB 'n';OBJECTID=<ABBCONFIGCEL'n'>')
  242.         then do
  243.              say 'TV2CFG Celeb 'n' created successfully'
  244.              file1 = drivedir'\BIN\TV2CFG.EXE'
  245.              file2 = drivedir'\BIN\TV2CFG.ICO'
  246.              rc = SysSetIcon( file1, file2)
  247.         end
  248.         else do
  249.              say 'Error creating TV2CFG Celeb 'n
  250.              Exit 0
  251.         end
  252.         if SysCreateObject( 'WPProgram', 'Rocket Remote Celeb 'n, '<ABBUTILFolder>',,
  253. 'EXENAME='drivedir'\BIN\RCON.EXE;PARAMETERS=CELEB 'n';MINWIN=DESKTOP;OBJECTID=<ABBROCKETCEL'n'>')
  254.         then do
  255.              say 'RCON Celeb 'n' created successfully'
  256.              file1 = drivedir'\BIN\RCON.EXE'
  257.              file2 = drivedir'\BIN\RCON.ICO'
  258.              rc = SysSetIcon( file1, file2)
  259.         end
  260.         else do
  261.              say 'Error creating RCON Celeb 'n
  262.              Exit 0
  263.         end
  264.         if SysCreateObject( 'WPProgram', 'Diagnostics Celeb 'n, '<ABBUTILFolder>',,
  265. 'EXENAME='drivedir'\BIN\PMDIAG.EXE;PARAMETERS=CELEB 'n';OBJECTID=<ABBDIAGCEL'n'>')
  266.         then do
  267.              say 'PMDIAG Celeb 'n' created successfully'
  268.              file1 = drivedir'\BIN\PMDIAG.EXE'
  269.              file2 = drivedir'\BIN\PMDIAG.ICO'
  270.              rc = SysSetIcon( file1, file2)
  271.         end
  272.         else do
  273.              say 'Error creating PMDIAG Celeb 'n
  274.              Exit 0
  275.         end
  276.         n = n + 1
  277.     end
  278.     end
  279.     n = 1
  280.     if prisms > 0 then
  281.     do
  282.     do until n = prisms + 1
  283.         if SysCreateObject( 'WPProgram', 'PMTV/2 Prism 'n, '<ABBUTILFolder>',,
  284. 'EXENAME='drivedir'\BIN\PMTV2.EXE;PARAMETERS=PRISM 'n';OBJECTID=<ABBPMTV2PRM'n'>')
  285.         then do
  286.              say 'PMTV/2 Prism 'n' created successfully'
  287.              file1 = drivedir'\BIN\PMTV2.EXE'
  288.              file2 = drivedir'\BIN\PMTV2.ICO'
  289.              rc = SysSetIcon( file1, file2)
  290.         end
  291.         else do
  292.              say 'Error creating PMTV/2 Prism 'n
  293.              Exit 0
  294.         end
  295.         if SysCreateObject( 'WPProgram', 'Prism 'n' Config', '<ABBUTILFolder>',,
  296. 'EXENAME='drivedir'\BIN\TV2CFG.EXE;PARAMETERS=PRISM 'n';OBJECTID=<ABBCONFIGPRM'n'>')
  297.         then do
  298.              say 'TV2CFG Prism 'n' created successfully'
  299.              file1 = drivedir'\BIN\TV2CFG.EXE'
  300.              file2 = drivedir'\BIN\TV2CFG.ICO'
  301.              rc = SysSetIcon( file1, file2)
  302.         end
  303.         else do
  304.              say 'Error creating TV2CFG Prism 'n
  305.              Exit 0
  306.         end
  307.         if SysCreateObject( 'WPProgram', 'Rocket Remote Prism 'n, '<ABBUTILFolder>',,
  308. 'EXENAME='drivedir'\BIN\RCON.EXE;PARAMETERS=PRISM 'n';MINWIN=DESKTOP;OBJECTID=<ABBROCKETPRM'n'>')
  309.         then do
  310.              say 'RCON Prism 'n' created successfully'
  311.              file1 = drivedir'\BIN\RCON.EXE'
  312.              file2 = drivedir'\BIN\RCON.ICO'
  313.              rc = SysSetIcon( file1, file2)
  314.         end
  315.         else do
  316.              say 'Error creating RCON Prism 'n
  317.              Exit 0
  318.         end
  319.         if SysCreateObject( 'WPProgram', 'Diagnostics Prism 'n, '<ABBUTILFolder>',,
  320. 'EXENAME='drivedir'\BIN\PMDIAG.EXE;PARAMETERS=PRISM 'n';OBJECTID=<ABBDIAGPRM'n'>')
  321.         then do
  322.              say 'PMDIAG Prism 'n' created successfully'
  323.              file1 = drivedir'\BIN\PMDIAG.EXE'
  324.              file2 = drivedir'\BIN\PMDIAG.ICO'
  325.              rc = SysSetIcon( file1, file2)
  326.         end
  327.         else do
  328.              say 'Error creating PMDIAG Prism 'n
  329.              Exit 0
  330.         end
  331.         n = n + 1
  332.     end
  333.     end
  334.     n = 1
  335.     if highqs > 0 then
  336.     do
  337.     do until n = highqs + 1
  338.         if SysCreateObject( 'WPProgram', 'PMTV/2 HighQ 'n, '<ABBUTILFolder>',,
  339. 'EXENAME='drivedir'\BIN\PMTV2.EXE;PARAMETERS=HIGHQ 'n';OBJECTID=<ABBPMTV2HQ'n'>')
  340.         then do
  341.              say 'PMTV/2 HighQ 'n' created successfully'
  342.              file1 = drivedir'\BIN\PMTV2.EXE'
  343.              file2 = drivedir'\BIN\PMTV2.ICO'
  344.              rc = SysSetIcon( file1, file2)
  345.         end
  346.         else do
  347.              say 'Error creating PMTV/2 HighQ 'n
  348.              Exit 0
  349.         end
  350.         if SysCreateObject( 'WPProgram', 'HighQ 'n' Config', '<ABBUTILFolder>',,
  351. 'EXENAME='drivedir'\BIN\TV2CFG.EXE;PARAMETERS=HIGHQ 'n';OBJECTID=<ABBCONFIGHQ'n'>')
  352.         then do
  353.              say 'TV2CFG HighQ 'n' created successfully'
  354.              file1 = drivedir'\BIN\TV2CFG.EXE'
  355.              file2 = drivedir'\BIN\TV2CFG.ICO'
  356.              rc = SysSetIcon( file1, file2)
  357.         end
  358.         else do
  359.              say 'Error creating TV2CFG HighQ 'n
  360.              Exit 0
  361.         end
  362.         if SysCreateObject( 'WPProgram', 'Rocket Remote HighQ 'n, '<ABBUTILFolder>',,
  363. 'EXENAME='drivedir'\BIN\RCON.EXE;PARAMETERS=HIGHQ 'n';MINWIN=DESKTOP;OBJECTID=<ABBROCKETHQ'n'>')
  364.         then do
  365.              say 'RCON HighQ 'n' created successfully'
  366.              file1 = drivedir'\BIN\RCON.EXE'
  367.              file2 = drivedir'\BIN\RCON.ICO'
  368.              rc = SysSetIcon( file1, file2)
  369.         end
  370.         else do
  371.              say 'Error creating RCON HighQ 'n
  372.              Exit 0
  373.         end
  374.         if SysCreateObject( 'WPProgram', 'Diagnostics HighQ 'n, '<ABBUTILFolder>',,
  375. 'EXENAME='drivedir'\BIN\PMDIAG.EXE;PARAMETERS=HIGHQ 'n';OBJECTID=<ABBDIAGHQ'n'>')
  376.         then do
  377.              say 'PMDIAG HighQ 'n' created successfully'
  378.              file1 = drivedir'\BIN\PMDIAG.EXE'
  379.              file2 = drivedir'\BIN\PMDIAG.ICO'
  380.              rc = SysSetIcon( file1, file2)
  381.         end
  382.         else do
  383.              say 'Error creating PMDIAG HighQ 'n
  384.              Exit 0
  385.         end
  386.         n = n + 1
  387.     end
  388.     end
  389.     n = 1
  390.     if encores > 0 then
  391.     do
  392.     do until n = encores + 1
  393.         if SysCreateObject( 'WPProgram', 'PMTV/2 Encore 'n, '<ABBUTILFolder>',,
  394. 'EXENAME='drivedir'\BIN\PMTV2.EXE;PARAMETERS=ENCOR 'n';OBJECTID=<ABBPMTV2ENC'n'>') then do
  395.              say 'PMTV/2 Encore 'n' created successfully'
  396.              file1 = drivedir'\BIN\PMTV2.EXE'
  397.              file2 = drivedir'\BIN\PMTV2.ICO'
  398.              rc = SysSetIcon( file1, file2)
  399.         end
  400.         else do
  401.              say 'Error creating PMTV/2 Encore 'n
  402.              Exit 0
  403.         end
  404.         if SysCreateObject( 'WPProgram', 'Encore 'n' Config', '<ABBUTILFolder>',,
  405. 'EXENAME='drivedir'\BIN\TV2CFG.EXE;PARAMETERS=ENCOR 'n';OBJECTID=<ABBCONFIGENC'n'>')
  406.         then do
  407.              say 'TV2CFG Encore 'n' created successfully'
  408.              file1 = drivedir'\BIN\TV2CFG.EXE'
  409.              file2 = drivedir'\BIN\TV2CFG.ICO'
  410.              rc = SysSetIcon( file1, file2)
  411.         end
  412.         else do
  413.              say 'Error creating TV2CFG Encore 'n
  414.              Exit 0
  415.         end
  416.         if SysCreateObject( 'WPProgram', 'Rocket Remote Encore 'n, '<ABBUTILFolder>',,
  417. 'EXENAME='drivedir'\BIN\RCON.EXE;PARAMETERS=ENCOR 'n';MINWIN=DESKTOP;OBJECTID=<ABBROCKETHQ'n'>')
  418.         then do
  419.              say 'RCON Encore 'n' created successfully'
  420.              file1 = drivedir'\BIN\RCON.EXE'
  421.              file2 = drivedir'\BIN\RCON.ICO'
  422.              rc = SysSetIcon( file1, file2)
  423.         end
  424.         else do
  425.              say 'Error creating RCON Encore 'n
  426.              Exit 0
  427.         end
  428.         if SysCreateObject( 'WPProgram', 'Diagnostics Encore 'n, '<ABBUTILFolder>',,
  429. 'EXENAME='drivedir'\BIN\PMDIAG.EXE;PARAMETERS=ENCOR 'n';OBJECTID=<ABBDIAGENC'n'>')
  430.         then do
  431.              say 'PMDIAG Encore 'n' created successfully'
  432.              file1 = drivedir'\BIN\PMDIAG.EXE'
  433.              file2 = drivedir'\BIN\PMDIAG.ICO'
  434.              rc = SysSetIcon( file1, file2)
  435.         end
  436.         else do
  437.              say 'Error creating PMDIAG Encore 'n
  438.              Exit 0
  439.         end
  440.         n = n + 1
  441.     end
  442.     end
  443.     n = 1
  444.     if wcasts > 0 then
  445.     do
  446.     do until n = wcasts + 1
  447.         if SysCreateObject( 'WPProgram', 'PMTV/2 WinCast 'n, '<ABBUTILFolder>',,
  448. 'EXENAME='drivedir'\BIN\PMTV2.EXE;PARAMETERS=WCAST 'n';OBJECTID=<ABBPMTV2WC'n'>')
  449.         then do
  450.              say 'PMTV/2 WinCast 'n' created successfully'
  451.              file1 = drivedir'\BIN\PMTV2.EXE'
  452.              file2 = drivedir'\BIN\PMTV2.ICO'
  453.              rc = SysSetIcon( file1, file2)
  454.         end
  455.         else do
  456.              say 'Error creating PMTV/2 WinCast 'n
  457.              Exit 0
  458.         end
  459.         if SysCreateObject( 'WPProgram', 'WinCast 'n' Config', '<ABBUTILFolder>',,
  460. 'EXENAME='drivedir'\BIN\TV2CFG.EXE;PARAMETERS=WCAST 'n';OBJECTID=<ABBCONFIGWC'n'>')
  461.         then do
  462.              say 'TV2CFG WinCast 'n' created successfully'
  463.              file1 = drivedir'\BIN\TV2CFG.EXE'
  464.              file2 = drivedir'\BIN\TV2CFG.ICO'
  465.              rc = SysSetIcon( file1, file2)
  466.         end
  467.         else do
  468.              say 'Error creating TV2CFG WinCast 'n
  469.              Exit 0
  470.         end
  471.         if SysCreateObject( 'WPProgram', 'Rocket Remote WinCast 'n, '<ABBUTILFolder>',,
  472. 'EXENAME='drivedir'\BIN\RCON.EXE;PARAMETERS=WCAST 'n';MINWIN=DESKTOP;OBJECTID=<ABBROCKETWC'n'>')
  473.         then do
  474.              say 'RCON WinCast 'n' created successfully'
  475.              file1 = drivedir'\BIN\RCON.EXE'
  476.              file2 = drivedir'\BIN\RCON.ICO'
  477.              rc = SysSetIcon( file1, file2)
  478.         end
  479.         else do
  480.              say 'Error creating RCON WinCast 'n
  481.              Exit 0
  482.         end
  483.         if SysCreateObject( 'WPProgram', 'Diagnostics WinCast 'n, '<ABBUTILFolder>',,
  484. 'EXENAME='drivedir'\BIN\PMDIAG.EXE;PARAMETERS=WCAST 'n';OBJECTID=<ABBDIAGWC'n'>')
  485.         then do
  486.              say 'PMDIAG WinCast 'n' created successfully'
  487.              file1 = drivedir'\BIN\PMDIAG.EXE'
  488.              file2 = drivedir'\BIN\PMDIAG.ICO'
  489.              rc = SysSetIcon( file1, file2)
  490.         end
  491.         else do
  492.              say 'Error creating PMDIAG WinCast 'n
  493.              Exit 0
  494.         end
  495.         n = n + 1
  496.     end
  497.     end
  498.     if num_tvs > 0 then
  499.     do
  500.     if SysCreateObject( 'WPProgram', 'Picture In Picture', '<ABBUTILFolder>',,
  501. 'EXENAME='drivedir'\BIN\PIP.EXE;OBJECTID=<ABBPIP>;STARTUPDIR='drivedir'\BIN')
  502.     then do
  503.          say 'Picture In Picture created successfully'
  504.          file1 = drivedir'\BIN\PIP.EXE'
  505.          file2 = drivedir'\BIN\PIP.ICO'
  506.          rc = SysSetIcon( file1, file2)
  507.  
  508.                                     /* create TVPOS.INI */
  509.          File = drivedir'\BIN\TVPOS.INI'
  510.          rc = stream(File, 'c', 'QUERY EXISTS')
  511.          if rc <> '' then
  512.          do
  513.              'del' File
  514.          end
  515.          rc = stream(File, 'c', 'OPEN WRITE')
  516.          m = 2
  517.          n = 1
  518.          celebs = 0
  519.          prisms = 0
  520.          highqs = 0
  521.          stubs = 0
  522.          txt = ''
  523.          do forever
  524.              cmd = 'info digitalvideo0'm 'product wait'
  525.              rc = SendString(cmd, ret_str)
  526.              if rc <> 0 then
  527.              do
  528.                  call lineout File, txt
  529.                  leave
  530.              end
  531.              if ret_str = "Hauppauge Celebrity" then
  532.              do
  533.                  celebs = celebs + 1
  534.                  txt = txt'celeb'celebs' '
  535.              end
  536.              if ret_str = "Hauppauge Prism" then
  537.              do
  538.                  prisms = prisms + 1
  539.                  txt = txt'prism'prisms' '
  540.              end
  541.              if ret_str = "Hauppauge HighQ" then
  542.              do
  543.                  highqs = highqs + 1
  544.                  txt = txt'highq'highqs' '
  545.              end
  546.              if ret_str = "Hauppauge Encore" then
  547.              do
  548.                  encores = encores + 1
  549.                  txt = txt'encores'encores' '
  550.              end
  551.              if ret_str = "Hauppauge WinCast" then
  552.              do
  553.                  wcasts = wcasts + 1
  554.                  txt = txt'wcasts'wcasts' '
  555.              end
  556.              if ((n // 4) = 0) then
  557.              do
  558.                  call lineout File, txt
  559.                  txt = ''
  560.              end
  561.              n = n + 1
  562.              m = m + 1
  563.          end
  564.          rc = stream(File, 'c', 'CLOSE')
  565.     end
  566.     else do
  567.          say 'Error creating Picture In Picture'
  568.          Exit 0
  569.     end
  570.     end
  571. end
  572. else do
  573.         say 'Error creating Utilities Folder.'
  574. end
  575.  
  576. ExitRC = mciRxExit()
  577. Exit 0
  578.  
  579. InstallEx:
  580.     arg Ex
  581.  
  582.         name = 'Example' Ex 'using' Video''Instance
  583.         path = drivedir'\SAMPLES\'Ex'\'Ex
  584.         objid = 'ABB'Ex'PROG'Video''Instance
  585.  
  586.         if SysCreateObject( 'WPProgram', name, '<ABBSAMPFolder>',,
  587. 'EXENAME='path'.EXE;PARAMETERS='Video' 'Instance';OBJECTID='objid'>')
  588.         then do
  589.              say name 'created successfully'
  590.              file1 = path'.EXE'
  591.              file2 = path'.ICO'
  592.              rc = SysSetIcon( file1, file2)
  593.         end
  594.         else do
  595.              say 'Error creating' name
  596.              Exit 0
  597.         end
  598.         return 0
  599.  
  600. /*   --- SendString --
  601. ** Call DLL function.  Pass the command to process and the
  602. ** name of a REXX variable that will receive textual return
  603. ** return code.
  604. */
  605. SendString:
  606.     arg CmndTxt
  607.     arg ret_str
  608.  
  609.         MacRC = mciRxSendString(CmndTxt, 'ret_str', '0', '0')
  610.         return MacRC
  611.