; <COMPULSORY> STATE_INIT is a compulsory state that must be present in the ini file.
; It is the starting state... 
[STATE_INIT]
STATE_TYPE=CStateInit
; <OPTIONAL> If set to 1, State_Init will check that the user has the Administrator
; privileges. This check is done only if running under Windows 2000 and XP (this parameter
; will be ignored on W9X OS's). If this parameter is omitted or set to 0, no check will be done.
CHECK_IS_ADMIN=1
NEXT_STATE=STATE_KILL_DEMOSHIELD

;===========================================================================
[STATE_KILL_DEMOSHIELD]
STATE_TYPE=CStateCustomAction

; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>
CALL_0=KillApp@demo32.exe
CALL_1=KillWindow@Companion Suite Pro LH

NEXT_STATE=STATE_CHECK_MSI

;===========================================================================
[STATE_CHECK_MSI]
STATE_TYPE=CStateMSI

; Command line to be executed if version not sufficient.
CMD_W98=.\InstMsiA.exe /c:"msiinst /delayrebootq"
CMD_WMe=.\InstMsiA.exe /c:"msiinst /delayrebootq"
CMD_W2000=.\InstMsiW.exe /c:"msiinst /delayrebootq"
CMD_WNT4=.\InstMsiW.exe /c:"msiinst /delayrebootq"
CMD_W2003=
CMD_WXP=

; <OPTIONAL> If REBOOT_WME is set to One, the system will be restarted
; after MSI has been updated.
REBOOT_WME=1
REBOOT_W98=1
REBOOT_WNT4=1
; REBOOT_W2000=0
; REBOOT_W2003=0
; REBOOT_WXP=0

; <OPTIONAL> Version of MSI that needs to be installed.
; These fields are optional. If omitted, 0 is used as the default value.
VER_MAJOR = 2
VER_MINOR = 0
VER_BUILD = 0

NEXT_STATE=STATE_PAPERPORT

;===========================================================================
[STATE_PAPERPORT]
STATE_TYPE=CStateInstallSoftware
; <COMPULSORY> Name of the application (used in the error messages)
APP_NAME=PaperPort

CHECK_OS_COMPATIBILITIE=1
NO_COMPATIB_W98=1
NO_COMPATIB_WME=1

; <COMPULSORY> Name of the application subkey in the uninstall key of the application.
UPGRADECODE={AEF2D1F4-0696-11D5-8E6A-00C04F7FA234}
CHECKINSTALLED={D7659F54-7502-4312-AA24-F103C92C26F5}
CHECKINSTALLED_ADDITIONAL={2BC2781A-F7F6-452E-95EB-018A522F1B2C}
VERSION_KEY_ADDITIONAL=SOFTWARE\ScanSoft\PaperPort
; <COMPULSORY> List of setup executables to launch depending on the language of the regional settings.
; If omitted, the state machine will tell the user that he should install the 
; software himself (using the CD-ROM that was provided with its device).
; If the cmd line is not found for a given language, the English cmd line
; is launched by default.


CMD_ENG=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_FRE=..\PaperPort\PaperPort\Setup.exe /L1036 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_GER=..\PaperPort\PaperPort\Setup.exe /L1031 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_ITA=..\PaperPort\PaperPort\Setup.exe /L1040 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_SPA=..\PaperPort\PaperPort\Setup.exe /L1034 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_DUT=..\PaperPort\PaperPort\Setup.exe /L1043 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_CHS=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_CSY=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_DAN=..\PaperPort\PaperPort\Setup.exe /L1030 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_HUN=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_NOR=..\PaperPort\PaperPort\Setup.exe /L1044 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_PLK=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_PTG=..\PaperPort\PaperPort\Setup.exe /L1046 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_SVE=..\PaperPort\PaperPort\Setup.exe /L1053 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_RUS=..\PaperPort\PaperPort\Setup.exe /L1049 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_TUR=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_CHT=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_KRN=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"
CMD_FIN=..\PaperPort\PaperPort\Setup.exe /L1033 /v"REBOOT=Suppress EREG=1 UPDSRV=0"

; <OPTIONAL> Adding uninstall command line argument.
; This fields are optional. 
UNINST_OPTION="REBOOT=R"
UNINSTALL_IF_OLDER=1
; <OPTIONAL> Version of the software that needs to be installed.
; These fields are optional. If omitted, 0 is used as the default value.
VER_MAJOR = 11
VER_MINOR = 1
VER_BUILD = 0

; <OPTIONAL> This specifies the default directory for the current state should be
; the directory where MSI is installed. The directory where MSI is installed
; is read back from the registry in key HKLM\Software\Microsoft\Windows\CurrentVersion\Installer
; The default directory is set back to the directory of MFInstallScheduler once the State has exited.
; of the executable. This tag overwrite the tag STATE_CURRENT_DIR if it was specified.
STATE_CURRENT_DIR_MSI=1

; <OPTIONAL> Size in MB of the required space for the installation on the C: drive.
; If this is omitted, no checking is performed on the free space on the C: drive.
;REQUIRED_SPACE_MB=80

; <COMPULSORY> Next state to which the state machine should go if the current state
; was successful.

NEXT_STATE=STATE_LAUNCH_PATCH
;===========================================================================


;===========================================================================

[STATE_LAUNCH_PATCH]
STATE_TYPE=CStateCustomAction

RUN_ACCORDING_TO_OS=1
RUN_ON_W98=0
RUN_ON_WME=0
RUN_ON_WNT4=0
RUN_ON_W2K=1
RUN_ON_W2003=0
RUN_ON_WXP=1
RUN_ON_WVista=1

DLL=MFCustomInstall.dll

CALL_0=LaunchExe@UpdaterLL2.exe

NEXT_STATE=STATE_LAUNCH_PATCH_R
;===========================================================================
;===========================================================================
[STATE_LAUNCH_PATCH_R]
STATE_TYPE=CStateCustomAction
RUN_ACCORDING_TO_OS=1
RUN_ON_W98=0
RUN_ON_WME=0
RUN_ON_WNT4=0
RUN_ON_W2K=1
RUN_ON_W2003=0
RUN_ON_WXP=1
RUN_ON_WVista=1
DLL=MFCustomInstall.dll
DO_ONLY_AT_REBOOT_NEDEED=1
CALL_0=LaunchExe@UpdaterLL2.exe
NEXT_STATE=STATE_MODIFY_REGISTRY
;===========================================================================

;===========================================================================
[STATE_MODIFY_REGISTRY]
STATE_TYPE=CStateCustomAction
RUN_ACCORDING_TO_OS=1
RUN_ON_W98=0
RUN_ON_WME=0
RUN_ON_WNT4=1
RUN_ON_W2K=1
RUN_ON_W2003=1
RUN_ON_WXP=1
RUN_ON_WVista=1
; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>

CALL_0=ChangeRegistryPermissions

NEXT_STATE=STATE_ADD_REGFILE
;===========================================================================

;===========================================================================
[STATE_ADD_REGFILE]
STATE_TYPE=CStateCustomAction
RUN_ACCORDING_TO_OS=1
RUN_ON_W98=0
RUN_ON_WME=0
RUN_ON_WNT4=1
RUN_ON_W2K=1
RUN_ON_W2003=1
RUN_ON_WXP=1
RUN_ON_WVista=1
; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>

CALL_0=LaunchRegFile@AddPaperPort.reg

NEXT_STATE=STATE_REMOVE_REGFILE
;===========================================================================

;===========================================================================
[STATE_REMOVE_REGFILE]
STATE_TYPE=CStateCustomAction
RUN_ACCORDING_TO_OS=1
RUN_ON_W98=0
RUN_ON_WME=0
RUN_ON_WNT4=1
RUN_ON_W2K=1
RUN_ON_W2003=1
RUN_ON_WXP=1
RUN_ON_WVista=1
; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

; Execute Custom Action only during an Uninstall operation.
DO_ONLY_AT_UNINSTALL=1

; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>

CALL_0=LaunchRegFile@RemovePaperPort.reg

NEXT_STATE=LAUNCH_REBOOT_DIALOG
;===========================================================================

;===========================================================================
[LAUNCH_REBOOT_DIALOG]
STATE_TYPE=CStateCustomAction

; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

RUN_ACCORDING_TO_OS=1
RUN_ON_W98=1
RUN_ON_WME=1
RUN_ON_WNT4=1
RUN_ON_W2K=1
RUN_ON_W2003=1
RUN_ON_WXP=1
RUN_ON_WVista=1

DO_ONLY_AT_REBOOT_NEDEED=1

; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>
; Parameters : LANG_OS ( Dialog will be displayed according to operating system language ).
; Parameters : LANG_RS ( Dialog will be displayed according to regional settings language ).
CALL_0=ShowRebootDialogInstall@1@LANG_OS


NEXT_STATE=LAUNCH_WITHOUT_REBOOT_DIALOG

[LAUNCH_WITHOUT_REBOOT_DIALOG]
STATE_TYPE=CStateCustomAction

; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

RUN_ACCORDING_TO_OS=1
RUN_ON_W98=1
RUN_ON_WME=1
RUN_ON_WNT4=1
RUN_ON_W2K=1
RUN_ON_W2003=1
RUN_ON_WXP=1
RUN_ON_WVista=1

; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>
; Parameters : LANG_OS ( Dialog will be displayed according to operating system language ).
; Parameters : LANG_RS ( Dialog will be displayed according to regional settings language ).
CALL_0=ShowDialogWithoutReboot@1@LANG_OS



NEXT_STATE=LAUNCH_REBOOT_UNINSTALL_DIALOG
;===========================================================================

;===========================================================================
[LAUNCH_REBOOT_UNINSTALL_DIALOG]
STATE_TYPE=CStateCustomAction

; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

RUN_ACCORDING_TO_OS=1
RUN_ON_W98=1
RUN_ON_WME=1
RUN_ON_WNT4=1
RUN_ON_W2K=1
RUN_ON_W2003=1
RUN_ON_WXP=1
RUN_ON_WVista=1

; Execute Custom Action only during an Uninstall operation.
DO_ONLY_AT_UNINSTALL=1
DO_ONLY_AT_REBOOT_NEDEED=1
; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>
; Parameters : LANG_OS ( Dialog will be displayed according to operating system language ).
; Parameters : LANG_RS ( Dialog will be displayed according to regional settings language ).
CALL_0=ShowRebootDialogUninstall@1@LANG_OS

NEXT_STATE=LAUNCH_WITHOUT_REBOOT_UNINSTALL_DIALOG
;===========================================================================

;===========================================================================
[LAUNCH_WITHOUT_REBOOT_UNINSTALL_DIALOG]
STATE_TYPE=CStateCustomAction

; Provide the name of the dll containing the function that
; will carry out the custom actions.
DLL=MFCustomInstall.dll

RUN_ACCORDING_TO_OS=1
RUN_ON_W98=1
RUN_ON_WME=1
RUN_ON_WNT4=1
RUN_ON_W2K=1
RUN_ON_W2003=1
RUN_ON_WXP=1
RUN_ON_WVista=1

; Execute Custom Action only during an Uninstall operation.
DO_ONLY_AT_UNINSTALL=1

; List of the calls that will be done.
; Syntax : CALL_<Order Number>=<FunctionName>@<First Parameter>@<Second Parameter>
; Parameters : LANG_OS ( Dialog will be displayed according to operating system language ).
; Parameters : LANG_RS ( Dialog will be displayed according to regional settings language ).
CALL_0=ShowDialogWithoutRebootUninstall@1@LANG_OS

NEXT_STATE=QUIT_STATEMACHINE
;===========================================================================
