[Variables]
Product=DPTF
ProductFullName=Intel(R) Dynamic Platform and Thermal Framework
ProductKey=SOFTWARE\Intel\%Product%
ProductParamKey=%ProductKey%\Parameters
ProductMessageKey=SYSTEM\CurrentControlSet\Services\eventlog\application\%Product%
ProductParamNameRoot=Root
ServiceName=esifsvc
ServiceDisplayName=ESIF Upper Framework Service
ServiceDescription=ESIF Upper Framework Service
ServiceFile=esif_uf.exe
PlaceholderFile=placeholder.txt
XslFile=combined.xsl
MsvcPRedistribFile=msvcp120.dll
MsvcRuntimeRedistribFile=msvcr120.dll
UfDir=ufx86
UfDir64=ufx64
LogDir=log
DvDir=%WinDir%\ServiceProfiles\LocalService\AppData\Local\Intel\DPTF
DspDvFile=dsp.dv

; Sequence information ------------------------------------------------
; INSTALLATION:
; -2000 - Stop services
; -1500 - Copy folders
; -1400 - Copy files and delete placeholder files
; -1350 - Create registry entries
; -1300 - Install services
; -1200 - Start services
;     0 - Driver installation
;  1000 - Add shortcuts
;
; UNINSTALL:
; -2000 - Stop services
;     0 - Uninstall drivers
;  1200 - Uninstall services
;  1300 - Remove UMDF device
;  1400 - Remove folders
;  1500 - Remove files
;  1600 - Remove registry entries
;  1700 - Remove shortcuts
;


[Registry]
condition=Is64
hive=64
operation=deleteonuninstall
root=HKLM
path=%ProductParamKey%
value=%ProductParamNameRoot%
data=%installDir%
type=sz
usequence=1600

[Registry]
condition=NOT Is64
hive=32
operation=deleteonuninstall
root=HKLM
path=%ProductParamKey%
value=%ProductParamNameRoot%
data=%installDir%
type=sz
usequence=1600

[Registry]
operation=deleteonuninstall
root=HKLM
path=%ProductMessageKey%
value=TypesSupported
data=7
type=dw
usequence=1600

[Registry]
condition=Is64
hive=64
operation=deleteonuninstall
root=HKLM
path=%ProductMessageKey%
value=EventMessageFile
data=%installDir%\%UfDir64%\%ServiceFile%
type=sz
usequence=1600

[Registry]
condition=NOT Is64
hive=32
operation=deleteonuninstall
root=HKLM
path=%ProductMessageKey%
value=EventMessageFile
data=%installDir%\%UfDir%\%ServiceFile%
type=sz
usequence=1600

[Registry]
operation=deleteonuninstall
root=HKLM
path=%ProductMessageKey%
value=CategoryCount
data=3
type=dw
usequence=1600

[Registry]
condition=Is64
hive=64
operation=deleteonuninstall
root=HKLM
path=%ProductMessageKey%
value=CategoryMessageFile
data=%installDir%\%UfDir64%\%ServiceFile%
type=sz
usequence=1600

[Registry]
condition=NOT Is64
hive=32
operation=deleteonuninstall
root=HKLM
path=%ProductMessageKey%
value=CategoryMessageFile
data=%installDir%\%UfDir%\%ServiceFile%
type=sz
usequence=1600

[Service]
operation=stoponuninstall
name=%ServiceName%
usequence=-2000

[Service]
operation=removeonuninstall
name=%ServiceName%
bin=%System%\%ServiceFile%
display=%ServiceDisplayName%
description=%ServiceDescription%
servicetype=own
starttype=auto
usequence=1200

[process]
condition=Is64
operation=runonuninstall
bin=%installDir%\%UfDir64%\%ServiceFile%
commandline=destroy
wait=yes
hide=yes
usequence=1300

[process]
condition=NOT Is64
operation=runonuninstall
bin=%installDir%\%UfDir%\%ServiceFile%
commandline=destroy
wait=yes
hide=yes
usequence=1300

[folder]
condition=Is64
operation=deleteonuninstall
destination=%installDir%\%UfDir64%
delete_if_not_empty=yes
usequence=1400

[folder]
condition=NOT Is64
operation=deleteonuninstall
destination=%installDir%\%UfDir%
delete_if_not_empty=yes
usequence=1400

[folder]
operation=deleteonuninstall
destination=%installDir%\%LogDir%
delete_if_not_empty=yes
usequence=1400

[File]
condition=Is64
operation=deleteonuninstall
destination=%installDir%\%UfDir64%\%XslFile%
mode=IfNotExists
sequence=-1400

[File]
condition=NOT Is64
operation=deleteonuninstall
destination=%installDir%\%UfDir%\%XslFile%
mode=IfNotExists
sequence=-1400

[File]
operation=deleteonuninstall
destination=%System%\%ServiceFile%
mode=overwrite
usequence=1500

[File]
condition=Is64
operation=deleteonuninstall
destination=%SystemCurOS%\%MsvcPRedistribFile%
mode=IfNotExists

[File]
condition=NOT Is64
operation=deleteonuninstall
destination=%system%\%MsvcPRedistribFile%
mode=IfNotExists

[File]
condition=Is64
operation=deleteonuninstall
destination=%SystemCurOS%\%MsvcRuntimeRedistribFile%
mode=IfNotExists


[File]
condition=NOT Is64
operation=deleteonuninstall
destination=%system%\%MsvcRuntimeRedistribFile%
mode=IfNotExists

[File]
operation=deleteonuninstall
destination=%DvDir%\%DspDvFile%
mode=overwrite
usequence=1500
