<?xml version="1.0" encoding="UTF-8"?>
<CoreSetup xsi:noNamespaceSchemaLocation="..\Schemas\Embedded State Sequence.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" FileSchemaVersion="1.0">
	<StateSequenceInfo EndState="STATE_End" FirstState="STATE_LanguageSelection">
		<DialogStateFile>hpbinstr.dll</DialogStateFile>
		<ResourceFiles>
			<ResourceFile>hpbsljres.dll</ResourceFile>
			<ResourceFile>hpbhires.dll</ResourceFile>
			<ResourceFile>hpbicnrs.dll</ResourceFile>
			<ResourceFile>hpbicres.dll</ResourceFile>
		</ResourceFiles>
		<Logging FileName="MarinerTest.log" ErrorOutput="SCREEN" LogOutput="FILE" LogLevel="5" ShowTime="true"/>
	</StateSequenceInfo>
	<States>
		<State StateID="STATE_LanguageSelection" Name="LanguageSelection">
			<StateInstall_MaintMode>
				<PleaseWait WaitAction="kill"/>
				<DialogState FunctionName="StateLanguageSelectionDialog" DLLPath="hpbicstat.dll"/>
				<NextState StateID="STATE_SetMSIInstallStateProperties"/>
			</StateInstall_MaintMode>
			<StateUninstallMode>
				<PleaseWait WaitAction="kill"/>
				<DialogState FunctionName="StateLanguageSelectionDialog" DLLPath="hpbicstat.dll"/>
				<NextState StateID="StateReadyToRemove"/>
			</StateUninstallMode>
		</State>
		<State StateID="STATE_SetMSIInstallStateProperties" Name="Set MSI installe state properties">
			<StateInstallMode>
				<StateAttributes Critical="false"/>
				<BinaryState>
					<DLLState DLLPath="hpbicstat.dll" FunctionName="SetMSIInstallState"/>
				</BinaryState>
				<NextState StateID="STATE_WelcomeEx"/>
			</StateInstallMode>
			<StateMaintMode>
				<StateAttributes Critical="false"/>
				<BinaryState>
					<DLLState DLLPath="hpbicstat.dll" FunctionName="SetMSIInstallState"/>
				</BinaryState>
				<NextState StateID="STATE_MaintType">
					<NextStateConditionList Property="CI_UPGRADE_NEEDED">
						<StateConditionItem Value="True" NextStateID="STATE_MaintUpgrade"/>
						<StateConditionItem Value="False" NextStateID="STATE_MaintType"/>
					</NextStateConditionList>
				</NextState>
			</StateMaintMode>
		</State>
		<State StateID="STATE_MaintUpgrade" Name="STATE_MaintUpgrade">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StateMaintenanceUpgradeDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_MaintUpgradeReboot"/>
			</StateInstall_MaintMode>
		</State>
		<State StateID="STATE_MaintUpgradeReboot" Name="STATE_MaintUpgradeReboot">
			<StateInstall_MaintMode>
				<StateAttributes Reboot="RebootAlways" Critical="true"/>
				<BinaryState>
					<DLLState DLLPath="hpbicstat.dll" FunctionName="DummyFunction"/>
				</BinaryState>
				<NextState StateID="STATE_End"/>
			</StateInstall_MaintMode>
		</State>

		<State StateID="STATE_MaintType" Name="STATE_MaintType">
			<StateMaintMode>
				<DialogState FunctionName="StateMaintenanceTypeDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_ConnectionType">
					<NextStateConditionList Property="CI_CORE_MaintType">
						<StateConditionItem Value="Install" NextStateID="STATE_MaintTypeInstall"/>
						<StateConditionItem Value="Change" NextStateID="StateMaintenanceComponents"/>
						<StateConditionItem Value="Remove" NextStateID="StateReadyToRemove"/>
					</NextStateConditionList>
				</NextState>
			</StateMaintMode>
		</State>
		<State StateID="StateUninstallComponents" Name="StateUninstallComponents">
			<StateInstallMode>
				<DialogState FunctionName="StateUninstallComponentsDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="StateReadyToRemove"/>
			</StateInstallMode>
		</State>
		<State StateID="StateReadyToRemove" Name="StateReadyToRemove">
			<StateMaintMode>
        <DialogState FunctionName="StateReadyToRemoveDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_End"/>
			</StateMaintMode>
			<StateUninstallMode>
				<DialogState FunctionName="StateReadyToRemoveDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_End"/>
			</StateUninstallMode>
		</State>
		<State StateID="StateMaintenanceComponents" Name="StateMaintenanceComponents">
			<StateMaintMode>
				<DialogState FunctionName="StateMaintenanceComponentsDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_End"/>
			</StateMaintMode>
		</State>
		<State StateID="STATE_WelcomeEx" Name="WelcomeEx">
			<StateInstallMode>
				<ConditionList EvaluatorType="ANY_TRUE">
					<PropertyCondition PropertyName="CI_INVOKED_CDBROWSER" PropertyValue="False"/>
					<PropertyCondition PropertyName="CI_HARDWARE_FIRST" PropertyValue="True"/>
				</ConditionList>
				<DialogState FunctionName="StateWelcomeDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_ExecuteUpfrontDiscovery">
					<NextStateConditionList Property="CI_HARDWARE_FIRST">
						<StateConditionItem Value="True" NextStateID="STATE_InstallationType"/>
						<StateConditionItem Value="False" NextStateID="STATE_ExecuteUpfrontDiscovery"/>
					</NextStateConditionList>
				</NextState>
			</StateInstallMode>
		</State>
		<State StateID="STATE_MaintTypeInstall" Name="MaintTypeInstall">
			<StateMaintMode>
				<StateAttributes Reboot="RebootNever" Critical="false"/>
				<BinaryState>
					<DLLState DLLPath="hpbicstat.dll" FunctionName="DummyFunction"/>
				</BinaryState>
				<NextState StateID="STATE_ExecuteUpfrontDiscovery">
					<NextStateConditionList Property="CI_HARDWARE_FIRST">
						<StateConditionItem Value="True" NextStateID="STATE_InstallationType"/>
						<StateConditionItem Value="False" NextStateID="STATE_ExecuteUpfrontDiscovery"/>
					</NextStateConditionList>
				</NextState>
			</StateMaintMode>
		</State>
		<State StateID="STATE_ConnectionType" Name="ConnectionType">
			<StateInstall_MaintMode>
				<ConditionList EvaluatorType="ALL_TRUE">
					<PropertyCondition PropertyName="CI_EXPRESS_INSTALL" PropertyValue="False"/>
				</ConditionList>
				<DialogState FunctionName="StateConnectionTypeDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_PortType">
					<NextStateConditionList Property="CI_CONNECTION_TYPE">
						<StateConditionItem Value="Network" NextStateID="STATE_ExecuteNetworkInstallDialogs"/>
						<StateConditionItem Value="Direct" NextStateID="StateInstallSelectModel"/>
						<StateConditionItem Value="Other" NextStateID="StateInstallSelectModel"/>
					</NextStateConditionList>
				</NextState>
			</StateInstall_MaintMode>
		</State>
		<State StateID="STATE_PortType" Name="PortType">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StatePortTypeDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="StateInstallSelectModel">
					<NextStateConditionList Property="CI_CONNECTION_TYPE">
						<StateConditionItem Value="Network" NextStateID="STATE_ExecuteNetworkInstallDialogs"/>
						<StateConditionItem Value="Direct" NextStateID="StateInstallSelectModel"/>
						<StateConditionItem Value="Other" NextStateID="StateInstallSelectModel"/>
					</NextStateConditionList>
				</NextState>
			</StateInstall_MaintMode>
		</State>
		<State StateID="STATE_ExecuteNetworkInstallDialogs" Name="ExecuteNetworkInstallDialogs">
			<StateInstall_MaintMode>
				<ConditionList EvaluatorType="ALL_TRUE">
					<PropertyCondition PropertyName="CI_CONNECTION_TYPE" PropertyValue="Network"/>
				</ConditionList>
				<StateAttributes Critical="true" Reboot="RebootNever"/>
				<BinaryState>
					<DLLState DLLPath="hpbnwkst.dll" FunctionName="ExecuteNetworkInstallDialogs"/>
				</BinaryState>
				<NextState StateID="STATE_ConnectionType">
					<NextStateConditionList Property="CI_NW_UPFRONTDVCNOTFOUND">
						<StateConditionItem Value="True" NextStateID="STATE_ConnectionType"/>
						<StateConditionItem Value="False" NextStateID="StateInstallSelectModel"/>
					</NextStateConditionList>
				</NextState>
			</StateInstall_MaintMode>
		</State>
		<State StateID="StateInstallSelectModel" Name="SelectModel">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StateSelectModelDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_InstallationType"/>
			</StateInstall_MaintMode>
		</State>
		<!-- Upfront Discovery Mode -->
		<State StateID="STATE_ExecuteUpfrontDiscovery" Name="ExecuteUpfrontDiscovery">
			<StateInstall_MaintMode>
				<ConditionList EvaluatorType="ANY_TRUE">
					<PropertyCondition PropertyName="CI_CONNECTION_TYPE" PropertyValue="Network"/>
					<PropertyCondition PropertyName="CI_EXPRESS_INSTALL" PropertyValue="False"/>
				</ConditionList>
				<StateAttributes Critical="true" Reboot="RebootNever"/>
				<BinaryState>
					<DLLState DLLPath="hpbnwkst.dll" FunctionName="ExecuteUpfrontDiscovery"/>
				</BinaryState>
				<NextState StateID="STATE_ConnectionType">
					<NextStateConditionList Property="CI_NW_UPFRONTDVCNOTFOUND">
						<StateConditionItem Value="True" NextStateID="STATE_ConnectionType"/>
						<StateConditionItem Value="False" NextStateID="StateInstallSelectModel"/>
					</NextStateConditionList>
				</NextState>
			</StateInstall_MaintMode>
		</State>
		<!-- End of Upfront Discovery Mode -->
		<State StateID="STATE_InstallationType" Name="InstallationType">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StateInstallationTypeDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_DriverDownload">
					<NextStateConditionList Property="CI_INSTALL_TYPE">
						<StateConditionItem Value="Custom" NextStateID="STATE_SelectDrivers"/>
            <StateConditionItem Value="Custom_Mono" NextStateID="STATE_SelectDrivers"/>
					</NextStateConditionList>
				</NextState>
			</StateInstall_MaintMode>
		</State>
		<State StateID="STATE_SelectDrivers" Name="SelectDrivers">
			<StateInstall_MaintMode>
				<ConditionList EvaluatorType="ALL_TRUE">
					<PropertyCondition PropertyName="CI_EXPRESS_INSTALL" PropertyValue="False"/>
				</ConditionList>
				<DialogState FunctionName="StateFeaturesDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_DriverDownload"/>
			</StateInstall_MaintMode>
		</State>
		<State StateID="STATE_Components" Name="Components">
			<StateInstall_MaintMode>
				<DialogState DLLPath="hpbinstr.dll" FunctionName="StateComponentsDialog"/>
				<NextState StateID="STATE_DriverDownload"/>
			</StateInstall_MaintMode>
		</State>
		<!--<State StateID="StateReadyToInstall" Name="StateReadyToInstall">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StateReadyToInstallDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_DriverDownload"/>
			</StateInstall_MaintMode>
		</State>-->
		<State StateID="STATE_DriverDownload" Name="StateDriverDownload">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StateDriverDownloadDialog" DLLPath="hpbinstr.dll"/>
				<NextState StateID="STATE_End"/>
			</StateInstall_MaintMode>
		</State>
		<State StateID="STATE_InstallCancel" Name="Cancel">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StateCancelDialog" DLLPath="hpbicstat.dll"/>
				<NextState StateID="STATE_End"/>
			</StateInstall_MaintMode>
			<StateUninstallMode>
				<DialogState FunctionName="StateCancelDialog" DLLPath="hpbicstat.dll"/>
				<NextState StateID="STATE_End"/>
			</StateUninstallMode>
		</State>
		<State StateID="STATE_InstallError" Name="Error">
			<StateInstall_MaintMode>
				<DialogState FunctionName="StateSmartErrorDialog" DLLPath="hpbicstat.dll"/>
				<NextState StateID="STATE_End"/>
			</StateInstall_MaintMode>
			<StateUninstallMode>
				<DialogState FunctionName="StateSmartErrorDialog" DLLPath="hpbicstat.dll"/>
				<NextState StateID="STATE_End"/>
			</StateUninstallMode>
		</State>
		<State StateID="STATE_InstallResume" Name="Resume">
			<StateInstallMode>
				<DialogState FunctionName="StateResumeDialog" DLLPath="hpbicstat.dll"/>
				<NextState StateID="STATE_End"/>
			</StateInstallMode>
		</State>
	</States>
</CoreSetup>
