rem Installation routine for Roxio MyDVD
rem Last Modified: 03/30/07

set devfound=0
set DTAName=X


rem check for Intel UMA video

rem Leonite
c:\hp\bin\devcon find "PCI\VEN_8086&DEV_2772&SUBSYS_2A50103C" >result.txt
find /C /I "matching device(s) found." result.txt
if not errorlevel 1 (
   set devfound=1
   )

rem Locktite
c:\hp\bin\devcon find "PCI\VEN_8086&DEV_2772&SUBSYS_2A53103C" >result.txt
find /C /I "matching device(s) found." result.txt
if not errorlevel 1 (
   set devfound=1
   )

rem Livermore
c:\hp\bin\devcon find "PCI\VEN_8086&DEV_2772&SUBSYS_2A57103C" >result.txt
find /C /I "matching device(s) found." result.txt
if not errorlevel 1 (
   set devfound=1
   )

rem Lucknow
c:\hp\bin\devcon find "PCI\VEN_8086&DEV_2772&SUBSYS_2A60103C" >result.txt
find /C /I "matching device(s) found." result.txt
if not errorlevel 1 (
   set devfound=1
   )

rem Leonite2
c:\hp\bin\devcon find "PCI\VEN_8086&DEV_2772&SUBSYS_2A5E103C" >result.txt
find /C /I "matching device(s) found." result.txt
if not errorlevel 1 (
   set devfound=1
   )

rem Lancaster
c:\hp\bin\devcon find "PCI\VEN_8086&DEV_2772&SUBSYS_2A59103C" >result.txt
find /C /I "matching device(s) found." result.txt
if not errorlevel 1 (
   set devfound=1
   )

rem Calcite
c:\hp\bin\devcon find "PCI\VEN_8086&DEV_27A2&SUBSYS_2A44103C" >result.txt
find /C /I "matching device(s) found." result.txt
if not errorlevel 1 (
   set devfound=1
   )

if "%MDVD_B%"=="1" goto Basic
if "%MDVD_P%"=="1" goto Premier


:Basic
rem Install MyDVD Basic
if "%devfound%" equ "1" (
  start /w c:\hp\tmp\src\setup.exe /qn CPATH=Basic\EMC9HMB.rxc REBOOT=ReallySuppress GRAPHIC_CHECK=SW
  goto CDELETE
  ) else (
  start /w c:\hp\tmp\src\setup.exe /qn CPATH=Basic\EMC9HMB.rxc REBOOT=ReallySuppress GRAPHIC_CHECK=HW
  goto CDelete
  )

:Premier
rem Install MyDVD Premier
if "%devfound%" equ "1" (
  start /w c:\hp\tmp\src\setup.exe /qn INSTALL_DOLBY=1 REBOOT=ReallySuppress GRAPHIC_CHECK=SW
  goto Done
  ) else (
  start /w c:\hp\tmp\src\setup.exe /qn INSTALL_DOLBY=1 REBOOT=ReallySuppress GRAPHIC_CHECK=HW
  goto Done
  )

:CDelete
REM Remove directory "DOLBYEMCCODECS_90"
pushd c:\i386\apps\dta
 
for /f "tokens=1 delims=. usebackq" %%i in (`findstr /M /i "%Article_Code%" *.dta`) do set DTAName=%%i
rd /s /q c:\i386\apps\%DTAName%\src\DOLBYEMCCODECS_90

popd

:Done

