; Action list for GFX/HDMI/TVWizard/IIPS

[Variables]
product=Intel(R) Graphics Media Accelerator Driver
installDir=%ProgFilesDir%\Intel\%product%
GFXVer=%getdriverversion(GFX)%


[Groups]
ARP=NOT IsCmd(noarp)
GFX=NOT IsCmd(nodrv) AND IfDrvExists(GFX)
HDMI=NOT IsCmd(nodrv) AND IfDrvExists(HDMI)
HDMI_HD=NOT IsCmd(nodrv) AND IfDrvExists(HDMI_HD)
MEDIA=IsGroupSel(HDMI_HD) AND IfExists(%source%\Media\Media.cab) AND IsOS(VISTA,0x060001FF)
IIPS=NOT IsCmd(nodrv) AND IfDrvExists(IIPS)
ICC=NOT IsCmd(noicc)
MSDK=IsGroupSel(GFX) AND IfExists(%source%\MediaSDK\libmfxhw32-i1.dll)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Setup files             ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[File]
operation=copyonly
mode=overwrite
source=%setup%
destination=%installDir%\uninstall\Setup.exe
sequence=500

[Folder]
operation=copy
mode=overwrite
source=%source%\lang
destination=%installDir%\uninstall
sequence=505

[File]
operation=copy
mode=overwrite
source=%source%\x64\Drv64.exe
destination=%installDir%\uninstall\x64\Drv64.exe
condition=Is64
sequence=510
usequence=11000

[File]
operation=copyonly
mode=ifnewer
source=%source%\difxapi.dll
destination=%system%\difxapi.dll
error=ignore
sequence=515

[File]
operation=copyonly
mode=ifnewer
source=%source%\x64\difxapi.dll
destination=%system64%\difxapi.dll
condition=Is64
error=ignore
sequence=515

[Uninstall]
name={F0E3AD40-2BBD-4360-9C76-B9AC9A5886EA}
display=%product%
display_mui=@%installDir%\Uninstall\Setup.exe,-2018
command=%installDir%\Uninstall\setup.exe -uninstall
location=%installDir%
publisher=Intel Corporation
icon=%installDir%\Uninstall\Setup.exe,0
modify=no
repair=no
version=%GFXVer%
sequence=520
group=ARP


;;;;;;;;;;;;;;;;;;;;;;;;
; GFX

[inf]
name=GFX
sequence=-5
usequence=1
group=GFX

[Registry]
operation=create
root=HKLM
path=System\CurrentControlSet\Control\Windows
value=SystemDirectory
data=%system%
type=sz
sequence=100
group=GFX

[Registry]
operation=create
root=HKLM
path=System\CurrentControlSet\Services\ialm\Device0
value=SystemDirectory
data=%system%
type=sz
sequence=100
group=GFX

[Registry]
operation=create
root=HKLM
path=System\CurrentControlSet\Services\ialm\Device1
value=SystemDirectory
data=%system%
type=sz
sequence=100
group=GFX

[Registry]
operation=createonly
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
value=WinSat
data=winsat dwm -xml results.xml
type=sz
condition=IsOS(VISTA,MAXOS) AND NOT IsCmd(nowinsat) AND IfDrvExists(GFX) AND NOT Is64
sequence=100
group=GFX

[Registry]
operation=createonly
hive=64
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
value=WinSat
data=winsat dwm -xml results.xml
type=sz
condition=IsOS(VISTA,MAXOS) AND NOT IsCmd(nowinsat) AND IfDrvExists(GFX) AND Is64
sequence=100
group=GFX


;;;;;;;;;;;;;;;;;;;;;;;;
; HDMI

[File]
operation=copy
source=%source%\Media\Media.cab
destination=%windir%\Media
decompress=yes
error=ignore
sequence=-4
usequence=1002
group=MEDIA

[inf]
name=HDMI
sequence=-3
usequence=10001
group=HDMI

[inf]
name=HDMI_HD
sequence=-3
usequence=10001
group=HDMI_HD


;;;;;;;;;;;;;;;;;;;;;;;;
; IIPS

[inf]
name=IIPS
sequence=-1
usequence=10000
group=IIPS


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Media SDK                      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; 32 bit

[File]
operation=copy
mode=overwrite
source=%source%\MediaSDK\libmfxhw32-i1.dll
destination=%commonappsdir%\Intel\Media SDK\i1\1.0\libmfxhw32-i1.dll
sequence=200
usequence=200
group=MSDK

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw32-i1-1
value=DeviceID
data=x%GFX_HWID%
type=dw
sequence=205
usequence=205
group=MSDK

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw32-i1-1
value=VendorID
data=x8086
type=dw
sequence=210
usequence=210
group=MSDK

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw32-i1-1
value=Merit
data=x08000001
type=dw
sequence=215
usequence=215
group=MSDK

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw32-i1-1
value=APIVersion
data=x0100
type=dw
sequence=220
usequence=220
group=MSDK

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw32-i1-1
value=Path
data=%commonappsdir%\Intel\Media SDK\i1\1.0\libmfxhw32-i1.dll
type=sz
sequence=225
usequence=225
group=MSDK

; 64 bit

[File]
operation=copy
mode=overwrite
source=%source%\MediaSDK\libmfxhw64-i1.dll
destination=%commonappsdir64%\Intel\Media SDK\i1\1.0\libmfxhw64-i1.dll
condition=Is64
sequence=250
usequence=250
group=MSDK

[Registry]
operation=create
hive=64
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw64-i1-1
value=DeviceID
data=x%GFX_HWID%
type=dw
condition=Is64
sequence=255
usequence=255
group=MSDK

[Registry]
operation=create
hive=64
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw64-i1-1
value=VendorID
data=x8086
type=dw
condition=Is64
sequence=260
usequence=260
group=MSDK

[Registry]
operation=create
hive=64
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw64-i1-1
value=Merit
data=x08000001
type=dw
condition=Is64
sequence=265
usequence=265
group=MSDK

[Registry]
operation=create
hive=64
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw64-i1-1
value=APIVersion
data=x0100
type=dw
condition=Is64
sequence=270
usequence=270
group=MSDK

[Registry]
operation=create
hive=64
root=HKLM
path=SOFTWARE\Intel\MediaSDK\Dispatch\hw64-i1-1
value=Path
data=%commonappsdir64%\Intel\Media SDK\i1\1.0\libmfxhw64-i1.dll
type=sz
condition=Is64
sequence=275
usequence=275
group=MSDK


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; These actions run on uninstall ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Process]
operation=stoponuninstall
bin=GfxUI.exe
usequence=-13
group=GFX

[Process]
operation=stoponuninstall
bin=igfxtray.exe
usequence=-12
group=GFX

[Process]
operation=stoponuninstall
bin=igfxsrvc.exe
usequence=-11
group=GFX

[Process]
operation=stoponuninstall
bin=hkcmd.exe
usequence=-10
group=GFX

[Process]
operation=stoponuninstall
bin=igfxpers.exe
usequence=-9
group=GFX

[Process]
operation=stoponuninstall
bin=igfxext.exe
usequence=-8
group=GFX

[File]
operation=deleteonuninstall
destination=%windir%\system32\igfxsrvc.exe
sequence=2
group=GFX

[File]
operation=deleteonuninstall
destination=%windir%\System32\igfxtray.exe
group=GFX
usequence=2

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\Display
delete_if_not_empty=YES
usequence=12000
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=HotKeysCmds
condition=NOT Is64
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=IgfxTray
condition=NOT Is64
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=Persistence
condition=NOT Is64
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
path=System\CurrentControlSet\Services\ialm\Device0
delete_if_not_empty=YES
usequence=100
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
path=System\CurrentControlSet\Services\ialm\Device1
delete_if_not_empty=YES
usequence=100
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\MediaSDK
usequence=275
group=MSDK

[registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\ICC\Applications\Graphics
usequence=100
group=GFX

[registry]
operation=deleteonuninstall
root=HKCU
path=SOFTWARE\Intel\ICC\Applications\Intel Graphics Driver
delete_if_not_empty=YES
condition=NOT Is64
usequence=100
group=GFX


;; 64 bit uninstall stuff

[Folder]
operation=deleteonuninstall
destination=%installDir%\uninstall\x64
delete_if_not_empty=yes
condition=Is64
usequence=11010

[Registry]
operation=deleteonuninstall
hive=64
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=HotKeysCmds
condition=Is64
group=GFX

[Registry]
operation=deleteonuninstall
hive=64
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=IgfxTray
condition=Is64
group=GFX

[Registry]
operation=deleteonuninstall
hive=64
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=Persistence
condition=Is64
group=GFX

[registry]
operation=deleteonuninstall
hive=64
root=HKCU
path=SOFTWARE\Intel\ICC\Applications\Intel Graphics Driver
delete_if_not_empty=YES
condition=Is64
usequence=100
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
hive=64
path=SOFTWARE\Intel\Display
delete_if_not_empty=YES
condition=Is64
usequence=12000
group=GFX

[Registry]
operation=deleteonuninstall
hive=64
root=HKLM
path=SOFTWARE\Intel\MediaSDK
condition=Is64
usequence=275
group=MSDK

