; Action list for 15.42+ GFX

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


[Groups]
ARP=NOT IsCmd(noarp) AND NOT IsCmd(nogfxdrv)
GFX=NOT IsCmd(nodrv) AND NOT IsCmd(nogfxdrv) AND IfDrvExists(GFX)
HDMI=NOT IsCmd(nodrv) AND IfDrvExists(HDMI)
MEDIA=IsVar(HDAUDIO,1) AND IfExists("%source%"\Media\Media.cab) AND IsOS(VISTA,0x060001FF)
GFXOCL=IsGroupSel(GFX) AND IfExists("%source%"\Graphics\OpenCL.dll) AND IsOS(VISTA,MAXOS)
CPUOCL=IsGroupSel(GFX) AND IfExists("%source%"\OpenCL\OCLSetup.exe) AND IsOS(VISTA,MAXOS)
ICCS=IsGroupSel(GFX) AND IfExists("%source%"\ICCS\SetupICCS.exe) AND IsOS(VISTA,MAXOS)
FUA=NOT IsCmd(notc) AND IfExists("%source%"\Update Manager\IntelUpdateManager.msi)
LR32=IfExists("%source%"\LR\x86\LanternRock.msi) AND NOT IsCmd(s)
LR64=IfExists("%source%"\LR\x64\LanternRock.msi) AND NOT IsCmd(s)

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

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

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

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

[File]
operation=copyonly
mode=ifnewer
source=%source%\difxapi.dll
destination=%system%\difxapi.dll
error=ignore
condition=NOT Is64
sequence=115

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

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

[Folder]
operation=deleteoninstall
destination=%ProgFilesDir%\Intel\Intel(R) Graphics Media Accelerator Driver
delete_if_not_empty=yes
sequence=12100
group=GFX

; Remove legacy uninstall key 32bit
[Registry]
operation=deleteoninstall
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\HDMI
delete_if_not_empty=YES
condition=NOT Is64
sequence=121
group=GFX

; Remove legacy uninstall key 64bit
[Registry]
operation=deleteoninstall
hive=64
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\HDMI
delete_if_not_empty=YES
condition=Is64
sequence=121
group=GFX

; Remove legacy product key 32bit
[Registry]
operation=deleteoninstall
root=HKLM
path=SOFTWARE\Intel\IGDI
delete_if_not_empty=YES
sequence=122
group=GFX

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Create AudioFix Key

[Registry]
operation=create
hive=64
root=HKLM
path=SOFTWARE\Intel\GFX\Internal\AudioFix
value=AudioSwitchUpgrade
data=1
type=dw
condition=IsCmd(audiofix) AND Is64
error=ignore
sequence=-9

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\GFX\Internal\AudioFix
value=AudioSwitchUpgrade
data=1
type=dw
condition=IsCmd(audiofix)
error=ignore
sequence=-9

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Delete AudioFix Key before
;before reboot to enable LPSP

[Registry]
operation=deleteoninstall
hive=64
root=HKLM
path=SOFTWARE\Intel\GFX\Internal\AudioFix
condition=Is64
delete_if_not_empty=YES
error=ignore
sequence=7000

[Registry]
operation=deleteoninstall
root=HKLM
path=SOFTWARE\Intel\GFX\Internal\AudioFix
delete_if_not_empty=YES
error=ignore
sequence=7000

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

[inf]
name=GFX
removedevice=yes
sequence=-3
usequence=1
group=GFX

[Process]
operation=runonly
bin=%systemcuros%\GfxUIEx.exe
commandline=-import %profilefile%
wait=yes
hide=yes
error=ignore
condition=IsCmd(import) AND NOT IsCmd(profile)
sequence=-2
group=GFX

[Process]
operation=runonly
bin=%systemcuros%\GfxUIEx.exe
commandline=-profile %profilename%
wait=yes
hide=yes
error=ignore
condition=IsCmd(profile) AND NOT IsCmd(import)
sequence=-2
group=GFX

[Process]
operation=runonly
bin=%systemcuros%\GfxUIEx.exe
commandline=-import %profilefile% -profile %profilename%
wait=yes
hide=yes
error=ignore
condition=IsCmd(profile) AND IsCmd(import)
sequence=-2
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=-5
usequence=1002
group=MEDIA

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

;;;;;;;;;;
; ICCS   ;
;;;;;;;;;;

[Process]
operation=runonly
bin=%source%\ICCS\SetupICCS.exe
commandline=/s /report "%_logpath%" /g %LangId%
wait=yes
hide=yes
sequence=1061
group=ICCS

[Process]
operation=runonuninstall
bin="%ProgFilesDir%\Intel\Intel(R) Integrated Clock Controller Service\uninstall\igxpin.exe"
commandline=/s /uninstall
wait=yes
hide=yes
error=ignore
usequence=471
group=ICCS

;;;;;;;;;;
; OpenCL ;
;;;;;;;;;;

[Process]
operation=runonly
bin=%source%\OpenCL\OCLSetup.exe
commandline=/s /report "%_logpath%" /g %LangId%
wait=yes
hide=yes
sequence=-5
group=CPUOCL

;Uninstall registry values placed by INF during installation. Do not delete key!
[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Khronos\OpenCL\Vendors
value=igdrcl32.dll
usequence=1000
group=GFXOCL

[Registry]
operation=deleteonuninstall
hive=64
root=HKLM
path=SOFTWARE\Khronos\OpenCL\Vendors
value=igdrcl64.dll
condition=Is64
usequence=1010
group=GFXOCL

[Process]
operation=runonuninstall
bin="%ProgFilesDir%\Intel\OpenCL SDK\3.0\Uninstall\Setup.exe"
commandline=/s /uninstall
wait=yes
hide=yes
error=ignore
usequence=470
group=CPUOCL

;;;;;;;;;;
; IRDSDK ;
;;;;;;;;;;

[File]
operation=copy
source=%source%\IRDSDK\IRDSDK.dll
destination=%installDir%\IRDSDK\IRDSDK.dll
error=ignore
sequence=1400
usequence=1003

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;         Update Manager       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[File]
operation=copy
mode=overwrite
source=%source%\Update Manager\IntelUpdateManager.msi
destination=%installDir%\Update Manager\IntelUpdateManager.msi
sequence=6003
GROUP=FUA

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;  Delete  GFX-CUI Shortcuts   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[File]
operation=deleteoninstall
destination=%startmenu%\Intel\Intel(R) HD Graphics Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%startmenu%\Intel(R) HD Graphics Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%startmenu%\Intel(R) Graphics and Media Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%startmenu%\Intel\Intel(R) Graphics and Media Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%commondesktop%\Intel(R) HD Graphics Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%commondesktop%\Intel(R) Graphics and Media Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%startmenu%\Intel\Intel(R) Iris(R) Graphics Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%startmenu%\Intel(R) Iris(R) Graphics Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%commondesktop%\Intel(R) Iris(R) Graphics Control Panel.lnk
error=ignore
sequence=6049

[File]
operation=deleteoninstall
destination=%commondesktop%\Intel\Intel(R) Iris(R) Graphics Control Panel.lnk
error=ignore
sequence=6049

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lantern Rock MSI        ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Process]
operation=runonly
bin=%system%\msiexec.exe
commandline=/I "%source%\LR\x86\LanternRock.msi" /qn CONSENT=1
wait=no
error=ignore
condition=NOT Is64
sequence=1300
group=LR32

[File]
operation=copyonly
mode=overwrite
source=%source%\LR\x86\LanternRock.msi
destination=%installDir%\uninstall\LanternRock.msi
error=ignore
condition=NOT Is64
sequence=1301
group=LR32

[Process]
operation=runonly
bin=%system%\msiexec.exe
commandline=/I "%source%\LR\x64\LanternRock.msi" /qn CONSENT=1
wait=no
error=ignore
condition=Is64
sequence=1300
group=LR64

[File]
operation=copyonly
mode=overwrite
source=%source%\LR\x64\LanternRock.msi
destination=%installDir%\uninstall\LanternRock.msi
error=ignore
condition=Is64
sequence=1301
group=LR64

[Process]
operation=runonuninstall
bin=%system%\msiexec.exe
commandline=/qn /x "%installDir%\uninstall\LanternRock.msi"
wait=yes
error=ignore
usequence=-10

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Telemetry Manifest      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[File]
operation=copyonly
mode=overwrite
source=%source%\Graphics\media_cp.man
destination=%progfilescuros%\Intel\Media Resource\media_cp.man
error=ignore
sequence=1305
usequence=130500

[File]
operation=copyonly
mode=overwrite
source=%source%\Graphics\igd11dxva32.dll
destination=%progfilescuros%\Intel\Media Resource\igd11dxva32.dll
error=ignore
sequence=1305
usequence=130500

[File]
operation=copyonly
mode=overwrite
source=%source%\Graphics\igd11dxva64.dll
destination=%progfilescuros%\Intel\Media Resource\igd11dxva64.dll
error=ignore
sequence=1305
usequence=130500

[Process]
operation=runonly
bin=%system%\wevtutil.exe
commandline=im "%progfilescuros%\Intel\Media Resource\media_cp.man"
wait=yes
error=ignore
sequence=1306

[Process]
operation=runonuninstall
bin=%system%\wevtutil.exe
commandline=um "%progfilescuros%\Intel\Media Resource\media_cp.man"
wait=yes
error=ignore
usequence=-15

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; VulkanRT                ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Process]
operation=runonly
bin=%installDir%\uninstall\UninstallVulkanRT.exe
commandline=/S
wait=yes
error=ignore
sequence=-10

[Process]
operation=runonuninstall
bin=%installDir%\uninstall\UninstallVulkanRT.exe
commandline=/S
wait=yes
error=ignore
usequence=-10

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

[Process]
operation=stoponuninstall
bin=GfxUIEx.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=%systemcuros%\igfxsrvc.exe
usequence=2
group=GFX

[File]
operation=deleteonuninstall
destination=%systemcuros%\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

[Folder]
operation=deleteonuninstall
destination=%installDir%\uninstall
delete_if_not_empty=yes
usequence=11020
group=GFX

[Folder]
operation=deleteonuninstall
destination=%installDir%\Update Manager
delete_if_not_empty=yes
usequence=11030
group=GFX

[Folder]
operation=deleteonuninstall
destination=%installDir%
delete_if_not_empty=no
usequence=11040
group=GFX

;; 64 bit uninstall stuff

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

[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
root=HKLM
hive=64
path=SOFTWARE\Intel\Display
delete_if_not_empty=YES
condition=Is64
usequence=12000
group=GFX

[Registry]
operation=deleteonuninstall
root=HKLM
path=SYSTEM\CurrentControlSet\Services\igfxCUIService2.0.0.0
delete_if_not_empty=YES
usequence=13000
group=GFX

;;;;;;;;;;;;;;;;;;;;;;;;;;
;; CPHS removal
[Service]
operation=stoponuninstall
name=CPHS
usequence=20040
error=ignore

[Service]
operation=removeonuninstall
name=CPHS
usequence=20060
error=ignore

[File]
operation=deleteonuninstall
destination=%system%\IntelCpHeciSvc.exe
usequence=20080
error=ignore

[File]
operation=deleteonuninstall
destination=%system%\iglhcp32.dll
usequence=20100
error=ignore

[File]
operation=deleteonuninstall
destination=%systemcuros%\iglhcp64.dll
condition=Is64
usequence=20100
error=ignore

;;;;;;;;;;;;;;;;;;;;;;;;;;
;; cplspcon removal
[Service]
operation=stoponuninstall
name=cplspcon
usequence=20041
error=ignore

[Service]
operation=removeonuninstall
name=cplspcon
usequence=20061
error=ignore

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;IntelCpHDCPSvc.exe is always in system32 for both x64/x86
[File]
operation=deleteonuninstall
destination=%systemcuros%\IntelCpHDCPSvc.exe
usequence=20081
error=ignore

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Cp_resouces.bin  is always in system32 for both x64/x86
[File]
operation=deleteonuninstall
destination=%systemcuros%\cp_resources.bin
usequence=30081
error=ignore
