;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Privacy Icon and UNS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[variables]
;CUSTOM VARIABLES CAN NOT HAVE NESTED CUSTOM VARIABLES
;  ONLY MAY NEST PRE-DEFINED VARIABLES
;path=EXECUTION PATH                   ;pre-defined
;system=SYSTEM PATH                    ;pre-defined
;progfilesdir=PROGRAM FILES DIRECTORY  ;pre-defined
;root=WINDOWS DRIVE (ie C:)	       ;pre-defined
commoninstalldir=%commonappsdir%\Intel\Privacy Icon
startfolder=Intel(R) Management and Security
[/variables]

[process]
exepath=%path%\dotnetfx.exe
parameters=/q:a /c:"install /q"
condition=IfExists(%path%\dotnetfx.exe) && !IsWoW
wait=yes
error=ignore
sequence=1
[/process]

[process]
exepath=%path%\NetFx64.exe
parameters=/q:a /c:"install /q"
condition=IfExists(%path%\NetFx64.exe) && IsWoW
wait=yes
error=ignore
sequence=1
[/process]

[copy directory]
source=%path%\UNS
destination=%commoninstalldir%\UNS
uninstall=true
condition=IfExists(%path%\UNS\UNS.exe)
sequence=1000
group=PICON
[/copy directory]

[copy directory]
source=%path%\PIcon\
destination=%commoninstalldir%
uninstall=true
condition=IfExists(%path%\PIcon\PrivacyIconClient.exe)
sequence=1001
group=PICON
[/copy directory]

[registry]
keyroot=HKLM
keypath=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
keyvalue=picon
keydata="%commoninstalldir%\PrivacyIconClient.exe" -startup
keytype=sz
condition=IfExists(%path%\PIcon\PrivacyIconClient.exe)
sequence=2000
group=PICON
[/registry]

[registry]
keyroot=HKU
keypath=SOFTWARE\Intel
keyvalue=PIcon
group=PICON
uninstall=only
[/registry]

[registry]
keyroot=HKLM
keypath=SOFTWARE\Intel\PIcon\
group=PICON
uninstall=only
[/registry]

[registry]
keyroot=HKLM
keypath=SOFTWARE\INTEL\IntelAMTUNS\
group=PICON
uninstall=only
[/registry]

[registry]
keyroot=HKLM
keypath=SYSTEM\CurrentControlSet\Services\Eventlog\Application\Intel(R) AMT\
group=PICON
uninstall=only
[/registry]

[services]
servicename=UNS
displayname=Intel(R) Active Management Technology User Notification Service
description=Intel(R) Active Management Technology User Notification Service - Updates the Windows Event Log with notifications of pre defined events received from the local Intel(R) Active Management Technology Device.
servicetype=SERVICE_WIN32_OWN_PROCESS
starttype=SERVICE_AUTO_START
binpath=%commoninstalldir%\UNS\UNS.exe
condition=IfExists(%path%\UNS\UNS.exe)
uninstall=true
sequence=3000
group=PICON
installcommand=RegisterNap
uninstallcommand=UnregisterNap
[/services]

[process]
exepath=%commoninstalldir%\PrivacyIconClient.exe
parameters=-startup
condition=IfExists(%path%\PIcon\PrivacyIconClient.exe)
terminate=yes
sequence=4000
group=PICON
[/process]

[shortcut]
target=%commoninstalldir%\PrivacyIconClient.exe
path=%startmenu%\%startfolder%\Intel(R) Management and Security Status.lnk
description=Intel(R) Management and Security Status
condition=IfExists(%path%\PICON\PrivacyIconClient.exe)
sequence=5000
group=PICON
[/shortcut]
