; Action list for AT7.x

[Variables]
product=Intel(R) Management Engine Components
installDir=%ProgFilesDir%\Intel\%product%
menuDir=%startmenu%\Intel\%product%
MEIVer=%getdriverversion(MEI)%
SOLVer=%getdriverversion(SOL)%


[Groups]
MEI=NOT IsCmd(nodrv) AND IfDrvExists(MEI) OR IsCmd(preinst)
WMI=IsGroupSel(MEI) AND NOT IsCmd(drvonly) AND IfExists("%source%"\MEWMIProv\MEProv.dll) AND NOT IsCmd(meionly)
SOL=IfDrvExists(SOL) OR IsCmd(preinst) AND NOT IsCmd(meionly)
LMS=IsGroupSel(MEI) AND NOT IsCmd(drvonly) OR IsCmd(nodrv) AND IfExists("%source%"\LMS\LMS.exe) AND NOT IsCmd(meionly)
UNS=IsGroupSel(LMS) AND IfExists("%source%"\UNS\UNS.exe)
IMSS=NOT IsCmd(noimss) AND IsGroupSel(UNS) AND IfExists("%source%"\IMSS\PIconStartup.exe)
NAC=IsGroupSel(UNS)
SHORTCUTS=IsGroupSel(IMSS) AND NOT IsCmd(nosc)
ARP=NOT IsCmd(noarp)
ICC=NOT IsCmd(noicc) AND IsGroupSel(SHORTCUTS)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 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
usequence=10000

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

[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={65153EA5-8B6E-43B6-857B-C6E4FC25798A}
display=%product%
display_mui=@%installDir%\Uninstall\Setup.exe,-2018
command=%installDir%\Uninstall\setup.exe -uninstall
location=%installDir%
estimatedsize=20959
publisher=Intel Corporation
icon=%installDir%\Uninstall\Setup.exe,0
modify=no
repair=no
version=%MEIVer%
sequence=520
group=ARP

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Drivers                 ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[INF]
name=MEI
sequence=600
usequence=5002
group=MEI

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\AMT
value=MEIVersion
data=%MEIVer%
type=sz
sequence=601
GROUP=MEI

[INF]
name=SOL
sequence=610
usequence=5001
group=SOL

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\AMT
value=SOLVersion
data=%SOLVer%
type=sz
sequence=611
GROUP=SOL


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; NAC                           ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[File]
operation=copy
source=%source%\NAC_PP\IntelAMTPP.dll
destination=%progfilesdir%\Common Files\postureAgent\plugins\install\IntelAMTPP.dll
sequence=1000
GROUP=NAC

[File]
operation=copy
source=%source%\NAC_PP\IntelAMTPP.inf
destination=%progfilesdir%\Common Files\postureAgent\plugins\install\IntelAMTPP.inf
sequence=1005
GROUP=NAC

[File]
operation=copy
source=%source%\NAC_PP\IntelAMTPP.dll
destination=%progfilesdir%\Common Files\postureAgent\plugins\IntelAMTPP.dll
sequence=1010
GROUP=NAC

[File]
operation=copy
source=%source%\NAC_PP\IntelAMTPP.inf
destination=%progfilesdir%\Common Files\postureAgent\plugins\IntelAMTPP.inf
sequence=1015
GROUP=NAC


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; LMS                           ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Service]
operation=stop
name=LMS
sequence=1026
group=LMS

[Folder]
operation=copy
source=%source%\LMS
destination=%installDir%\LMS
sequence=1040
GROUP=LMS

[Registry]
operation=create
root=HKLM
path=SYSTEM\CurrentControlSet\Services\Eventlog\Application\LMS
value=EventMessageFile
data=%installDir%\LMS.exe
type=sz
sequence=1050
GROUP=LMS

[Registry]
operation=create
root=HKLM
path=SYSTEM\CurrentControlSet\Services\Eventlog\Application\LMS
value=TypesSupported
data=7
type=dw
sequence=1060
GROUP=LMS

[Service]
operation=install
name=LMS
display=Intel(R) Management and Security Application Local Management Service
description=Allows applications to access the local Intel(R) Management and Security Application using its locally-available selected network interfaces.
servicetype=own
starttype=delay
bin=%installDir%\LMS\LMS.exe
sequence=1070
GROUP=LMS


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; UNS                           ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Service]
operation=stop
name=UNS
sequence=1022
group=UNS

[Process]
operation=runonly
bin=%installDir%\UNS\UNS.exe
commandline=/unregserver
wait=yes
sequence=1024
error=ignore
group=UNS

[Folder]
operation=copy
source=%source%\UNS
destination=%installDir%\UNS
sequence=2040
group=UNS

[Process]
operation=runonly
bin=%installDir%\UNS\UNS.exe
commandline=/service
wait=yes
sequence=2050
group=UNS


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; IMSS                          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Process]
operation=stoponinstall
bin=PrivacyIconClient.exe
sequence=1020
group=IMSS

[Folder]
operation=copy
source=%source%\IMSS\
destination=%installDir%\IMSS
sequence=1028
group=IMSS

[Shortcut]
target=%installDir%\IMSS\PrivacyIconClient.exe
path=%menuDir%\Intel(R) Management and Security Status.lnk
description=%getstring(11009)%
description_mui=@%installDir%\Uninstall\Setup.exe,-11009
pathmui=%installDir%\Uninstall\Setup.exe,11004
mui1=%menuDir%;%installDir%\Uninstall\Setup.exe,11004
sequence=2020
group=SHORTCUTS

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=IMSS
data="%installDir%\IMSS\PIconStartup.exe"
type=sz
sequence=2030
group=IMSS

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\PIcon\Setting
value=ShowUserNotification
data=1
type=sz
sequence=2032
GROUP=IMSS


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Intel Control Center          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[registry]
operation=create
root=HKLM
path=SOFTWARE\Intel\ICC\Applications\IMSS
value=Path
data=%menuDir%\Intel(R) Management and Security Status.lnk
type=sz
sequence=2070
group=ICC


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; WMI Provider                  ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Folder]
operation=copy
source=%source%\MEWMIProv\
destination=%installDir%\MEWMIProv
sequence=3000
usequence=20
group=WMI

[Process]
operation=runonly
bin=mofcomp.exe
commandline=ME\wmi_build.mof
workdir=%installDir%\MEWMIProv
wait=yes
hide=yes
sequence=3010
group=WMI

[Process]
operation=runonly
bin=mofcomp.exe
commandline=ME\register.mof
workdir=%installDir%\MEWMIProv
wait=yes
hide=yes
sequence=3020
group=WMI

[Process]
operation=runonly
bin=regsvr32.exe
commandline=/S "%installDir%\MEWMIProv\MeProv.dll"
workdir=%installDir%\MEWMIProv
wait=yes
sequence=3030
group=WMI


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;        Version Info Files      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[File]
operation=copy
mode=overwrite
source=%source%\IntelMEFWVer\IntelMEFWVer.dll
destination=%system64%\drivers\IntelMEFWVer.dll
error=ignore
sequence=4040

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Launch apps                    ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Service]
operation=start
name=LMS
sequence=3050
group=LMS

[Service]
operation=start
name=UNS
sequence=3060
group=UNS

[Process]
operation=runonly
bin=%installDir%\IMSS\PrivacyIconClient.exe
commandline=-startup
wait=no
hide=no
condition=NOT IsCmd(norun)
sequence=3070
group=IMSS


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

[Process]
operation=stoponuninstall
bin=PrivacyIconClient.exe
sequence=602
usequence=-10
group=IMSS

[Service]
operation=stoponuninstall
name=UNS
sequence=1022
usequence=-9
group=UNS

[Process]
operation=runonuninstall
bin=%installDir%\UNS\UNS.exe
commandline=/unregserver
wait=yes
sequence=1023
usequence=-8
group=UNS

[Service]
operation=stoponuninstall
name=LMS
sequence=1026
usequence=-6
group=LMS

[Registry]
operation=deleteonuninstall
root=HKCU
path=SOFTWARE\Intel\PIcon
delete_if_not_empty=YES
sequence=602
usequence=10000
group=IMSS

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\PIcon
delete_if_not_empty=YES
sequence=602
usequence=10000
group=IMSS

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\INTEL\IntelAMTUNS
delete_if_not_empty=YES
sequence=1022
usequence=10000
group=UNS

[Registry]
operation=deleteonuninstall
hive=64
root=HKLM
path=SOFTWARE\INTEL\IntelAMTUNS
delete_if_not_empty=YES
condition=Is64
sequence=1022
usequence=10000
group=UNS

[Registry]
operation=deleteonuninstall
root=HKLM
path=SYSTEM\CurrentControlSet\Services\Eventlog\Application\Intel(R) AMT
sequence=1026
group=LMS

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\IntelAMTPP
value=Posture
sequence=1000
group=NAC

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\IntelAMTPP
value=PostureHash
sequence=1000
group=NAC

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\IntelAMTPP
value=OldPostureHash
sequence=1000
group=NAC

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel\ICC\Applications\IMSS
delete_if_not_empty=YES
sequence=602
usequence=4999
group=IMSS

[Process]
operation=runonuninstall
bin=mofcomp.exe
commandline=ME\remove.mof
workdir=%installDir%\MEWMIProv
wait=yes
hide=yes
sequence=3000
usequence=15
group=WMI

[Process]
operation=runonuninstall
bin=regsvr32.exe
commandline=/S /U "%installDir%\MEWMIProv\MeProv.dll"
workdir=%installDir%\MEWMIProv
wait=yes
sequence=3000
usequence=17
group=WMI

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

[Registry]
operation=deleteonuninstall
root=HKLM
path=SOFTWARE\Intel
usequence=12000

[Registry]
operation=deleteonuninstall
hive=64
root=HKLM
path=SOFTWARE\Intel
condition=Is64
usequence=12000