; RSTe 3.0

[Variables]
product=Intel(R) Rapid Storage Technology enterprise
installDir=%ProgFilesDir%\Intel\%product%
menuDir=%startmenu%\Intel
AHCIVer=%getdriverversion(AHCI)%
SCUVer=%getdriverversion(SCU)%


[Groups]
APP=NOT IsCmd(noservice)
TRAY=NOT IsCmd(notray) AND IsGroupSel(APP)
UI=NOT IsCmd(nogui) AND IsGroupSel(APP)
SHORTCUTS=IsGroupSel(UI) AND NOT IsCmd(nosc)
ARP=NOT IsCmd(noarp)
AHCI_DRV=NOT IsCmd(nodrv) AND IfDrvExists(AHCI)
SCU_DRV=NOT IsCmd(nodrv) AND IfDrvExists(SCU)
RSTE=IsOS(WINXP64,MAXOS)


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

[File]
operation=copyonly
mode=overwrite
source=%setup%
destination=%installDir%\uninstall\Setup.exe
sequence=500
group=RSTE

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

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

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

[File]
operation=copyonly
mode=ifnewer
source=%source%\x64\difxapi.dll
destination=%system64%\difxapi.dll
condition=Is64
error=ignore
sequence=515
usequence=9002
group=RSTE

[Uninstall]
name={8B313BF5-9BD5-42a3-94C1-A28AF3AA51CC}
display=%product%
display_mui=@%installDir%\Uninstall\Setup.exe,-2018
command=%installDir%\Uninstall\setup.exe -uninstall
location=%installDir%
;estimatedsize=18942
publisher=Intel Corporation
icon=%installDir%\IAStorUI.exe,0
modify=no
repair=no
version=%AHCIVer%
sequence=520
group=ARP


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Driver                  ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[INF]
name=AHCI
sequence=600
usequence=5000
uninstall=no
group=AHCI_DRV

[INF]
name=SCU
sequence=601
usequence=5000
uninstall=no
group=SCU_DRV


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Application                   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[Process]
operation=stoponinstall
bin=IAStorUI.exe
sequence=1000
group=APP

[Process]
operation=stoponinstall
bin=IAStorIcon.exe
sequence=1010
group=APP

[Process]
operation=runonly
bin=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
commandline=uninstall "%installDir%\IAStorDataMgrSvc.exe"
wait=yes
hide=yes
sequence=1015
error=ignore
group=APP

[Process]
operation=runonly
bin=%windir%\Microsoft.NET\Framework\v4.0.30319\installutil.exe
commandline=/u "%installDir%\IAStorDataMgrSvc.exe"
wait=yes
hide=yes
sequence=1020
error=ignore
group=APP

[Folder]
operation=copy
source=%source%\Application\
destination=%installDir%
sequence=1030
GROUP=APP

[Process]
operation=runonly
bin=%windir%\Microsoft.NET\Framework\v4.0.30319\installutil.exe
commandline="%installDir%\IAStorDataMgrSvc.exe"
wait=yes
hide=yes
sequence=1050
error=ignore
group=APP

[Process]
operation=runonly
bin=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
commandline=install "%installDir%\IAStorDataMgrSvc.exe"
wait=yes
hide=yes
sequence=1052
error=ignore
group=APP

[Registry]
operation=create
root=HKLM
path=System\CurrentControlSet\Services\IaStorDataMgrSvc
value=DelayedAutoStart
data=1
type=dw
sequence=1053
group=APP

[Shortcut]
path=%menuDir%\Intel(R) Rapid Storage Technology enterprise.lnk
target=%installDir%\IAStorUI.exe
description_mui=@%installDir%\uninstall\Setup.exe,-2553
pathmui=%installDir%\Uninstall\Setup.exe,2018
sequence=1060
group=SHORTCUTS

[Registry]
operation=create
root=HKLM
path=SOFTWARE\Microsoft\Windows\CurrentVersion\Run
value=IAStorIcon
data=%installDir%\IAStorIcon.exe
type=sz
sequence=1080
group=TRAY


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

[Process]
operation=stoponuninstall
bin=IAStorIcon.exe
usequence=-10
group=UI

[Process]
operation=stoponuninstall
bin=IAStorUI.exe
usequence=-9
group=UI

[Process]
operation=runonuninstall
bin=%windir%\Microsoft.NET\Framework\v4.0.30319\installutil.exe
commandline=/u "%installDir%\IAStorDataMgrSvc.exe"
wait=yes
hide=yes
usequence=-8
error=ignore
group=APP

[Process]
operation=runonuninstall
bin=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
commandline=uninstall "%installDir%\IAStorDataMgrSvc.exe"
wait=yes
hide=yes
usequence=-7
error=ignore
group=APP

[File]
operation=deleteonuninstall
destination=%installDir%\IAStorDataMgrSvc.InstallLog
usequence=1010
group=RSTE

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

