;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; App Pinning IIF2 file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[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
installdir=%progfilesdir%\Intel\Intel Matrix Storage Manager
imsm_ver=%GetDriverVersion(IMSM)%
invm_ver=%GetDriverVersion(iaNvStor)%
startfolder=%GetString(16)%
startfolder2=%GetString(27)%
[/variables]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Application pinning
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[copy directory]
source=%path%\PinningUI
destination=%installdir%\PinningUI
uninstall=true
condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui)
sequence=10000
group=ITM
error=ignore
[/copy directory]

; For 32 bit platform
[copy directory]
source=%path%\PinningUI\itm.gadget
destination=%progfilesdir%\Windows Sidebar\Shared Gadgets\itm.gadget
uninstall=true
condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui) && !IsWoW
sequence=10005
group=ITM
error=ignore
[/copy directory]

; For 64 bit platform
[copy directory]
source=%path%\PinningUI\itm.gadget
destination=%progfilesdir64%\Windows Sidebar\Shared Gadgets\itm.gadget
uninstall=true
condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui) && IsWoW
sequence=10005
group=ITM
error=ignore
[/copy directory]

[registry]
keyroot=HKLM
keypath=SOFTWARE\Intel\Turbo Memory\Dashboard\
keyvalue=ApplicationPath
keydata=%installdir%\PinningUI
keytype=sz
uninstall=true
sequence=10010
condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui)
group=ITM
error=ignore
[/registry]

[services]
servicename=ITMServ
displayname=Intel(R) Application Pinning Service
servicetype=SERVICE_WIN32_OWN_PROCESS
starttype=SERVICE_AUTO_START
binpath=%installdir%\PinningUI\ITMService.exe
condition=IsNotCmd(nomon) && IsNotCmd(nogui) && IsNotCmd(noimsmgui)
sequence=10105
uninstall=true
group=ITM
error=ignore
[/services]

;[process]
;exepath=%installdir%\PinningUI\ITMSysTray.exe
;condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui)
;sequence=10110
;uninstall=true
;kill=yes
;group=ITM
;error=ignore
;[/process]

;[shortcut]
;target=%installdir%\PinningUI\ITMDashboard.exe
;path=%commondesktop%\%GetString(2513)%.lnk
;description=%GetString(2513)%
;condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui)
;sequence=10200
;group=ITM
;error=ignore
;[/shortcut]

[shortcut]
target=%installdir%\PinningUI\ITMDashboard.exe
path=%startmenu%\%startfolder2%\%GetString(2513)%.lnk
description=%GetString(2513)%
condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui)
sequence=10210
group=ITM
error=ignore
[/shortcut]

;[shortcut]
;target=%installdir%\PinningUI\ITMSysTray.exe
;path=%startmenu%\Startup\%GetString(2513)%.lnk
;description=%GetString(2513)%
;condition=IsOS(1024) && IsNotCmd(nogui) && IsNotCmd(noitmgui)
;sequence=10215
;group=ITM
;error=ignore
;[/shortcut]

[copy directory]
destination=%installdir%\PinningUI
uninstall=only
group=ITM
error=ignore
[/copy directory]
