;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;  Instruction INI file for gfx+cc installer
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;-----NOTE: USE ALL LOWER CASE FOR SECTION AND PROPERTY NAMES


;***************************************** General Format
;[section]
;property1=value1
;property2=value2
;property3=value3
;uninstall=true | false | only
;[/section]


;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;++                               BEGIN                                 ++
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

;-------------------------------------------------------------------------
;--                         VARIABLE DECLARATIONS                       --
;-------------------------------------------------------------------------
[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 Poulsbo USBC Client
startfolder=Intel(R) Poulsbo USBC Client
[/variables]

[installoptions]
finishexe=%installdir%\USBCClientUtil.exe
rebootonfilelock=false
sameversionlaunchexe=USBCClientUtil.exe
drivercomponent=client
[/installoptions]

[copy file]
source=%path%\setup.exe
destination=%installdir%\setup.exe
uninstall=true
[/copy file]

[copy file]
source=%path%\IIF2.ini
destination=%installdir%\IIF2.ini
uninstall=true
[/copy file]

[copy file]
source=%path%\USBCEventConsumerProvider.dll
destination=%installdir%\USBCEventConsumerProvider.dll
uninstall=true
[/copy file]

[registerdll]
dllpath=%installdir%\USBCEventConsumerProvider.dll
uninstall=true
[/registerdll]

[copy file]
source=%path%\DeleteNDISWMIConsumer.mof
destination=%installdir%\DeleteNDISWMIConsumer.mof
uninstall=true
[/copy file]

[copy file]
source=%path%\RegisterNDISWMIConsumer.mof
destination=%installdir%\RegisterNDISWMIConsumer.mof
uninstall=true
[/copy file]


[process]
exepath=%system%\wbem\mofcomp.exe
parameters="%installdir%\DeleteNDISWMIConsumer.mof"
uninstall=only
window=hide
[/process]

[process]
exepath=%system%\wbem\mofcomp.exe
parameters="%installdir%\RegisterNDISWMIConsumer.mof"
uninstall=false
window=hide
[/process]

[registry]
keyroot=HKLM
keypath=Software\Intel\USBCClient\InstanceConfig
keyvalue=ArpNumRetries
keydata=15
keytype=dw
uninstall=true
[/registry]

[registry]
keyroot=HKLM
keypath=Software\Intel\USBCClient\InstanceConfig
keyvalue=ArpRetryInterval
keydata=6
keytype=dw
uninstall=true
[/registry]

[copy file]
source=%path%\USBCClientUtil.exe
destination=%installdir%\USBCClientUtil.exe
uninstall=true
createlink=true
[/copy file]

[copy file]
source=%path%\difxapi.dll
destination=%system%\difxapi.dll
uninstall=false
[/copy file]

[copy file]
source=%path%\x64\difxapi.dll
destination=%system%\x64\difxapi.dll
uninstall=false
condition=IsWoW
[/copy file]

[copy file]
source=%path%\x64\Difx64.exe
destination=%system%\x64\Difx64.exe
uninstall=false
condition=IsWoW
[/copy file]

[registry]
keyroot=HKLM
keypath=SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USBCClient
keyvalue=DisplayName
keydata=Intel(R) Poulsbo USBC Client
keytype=sz
uninstall=true
postinstall=true
[/registry]

[registry]
keyroot=HKLM
keypath=SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USBCClient
keyvalue=UninstallString
keydata="%installdir%\setup.exe" -uninstall
keytype=sz
uninstall=true
postinstall=true
[/registry]

[registry]
keyroot=HKLM
keypath=SOFTWARE\Intel\USBCClient
keyvalue=installdir
keydata=%installdir%
keytype=sz
uninstall=true
postinstall=true
[/registry]

[registry]
keyroot=HKCU
keypath=SOFTWARE\Intel\USBCClient
keyvalue=HasWizardFinished
keydata=0
keytype=dw
condition=InstallComponent(utility)
uninstall=true
postinstall=true
[/registry]

[registry]
keyroot=HKCU
keypath=SOFTWARE\Intel\USBCClient
keyvalue=IsInstalled
keydata=0
keytype=dw
uninstall=true
postinstall=true
[/registry]

[registry]
keyroot=HKCU
keypath=SOFTWARE\Intel\USBCClient
keyvalue=IsInstalled
keydata=1
keytype=dw
condition=InstallComponent(utility)
uninstall=true
postinstall=true
[/registry]