'//////////////////////////////////////////////////////////////////////////////
'                                                                            
'  IIIIIII    A                                                            
'    II      A A                        InstallAide (R)                  
'    II     A   A      (c) 2000-2005, InstallAide Software 
'    II     AAAAA      Amethyst   
'  IIIIIII AA   AA                        
'                                                                                                                                                  '
'//////////////////////////////////////////////////////////////////////////////
Dim		BACKSTEP
Dim		NEXTSTEP
Dim		EXITSTEP
Dim 	strStep
Dim 	IAParam
Dim		strTemp
Dim 	strSetupImage
Dim 	strSupportDir
Dim		nState

BACKSTEP 	= 1
NEXTSTEP 	= 2
EXITSTEP 	= 3

MS_MODIFY	= 1
MS_RESTORE 	= 2
MS_REMOVE	= 3

Set IAParam 	= Install.CreateIAParam()

OnInstall

Set IAParam = Nothing

'--------------------------------------------
' °²×°ÏµÍ³
'--------------------------------------------
Sub OnInstall()
	strStep 		= "SdWelCom"

	Do While strStep <> "Exit"
		Select Case strStep
			Case "SdWelCom"
				nState = Install.SdWelcome(IAParam)
				If nState = BACKSTEP Then
					strStep = "SdWelCom"
				ElseIf nState = NEXTSTEP Then
					strStep = "SdSetDBSource"
				Else 
					strStep = "Exit"
				End If
				
			Case "SdSetDBSource"  
	   			nState = Install.SdSetDBSource(IAParam)
				If nState = BACKSTEP Then
					strStep = "SdWelCom"
				ElseIf nState = NEXTSTEP Then
					strStep = "SdSetDBUser"
				Else 
					strStep = "Exit"
				End If
				
			Case "SdSetDBUser"  
	   			nState = Install.SdSetDBUser(IAParam)
				If nState = BACKSTEP Then
					strStep = "SdSetDBSource"
				ElseIf nState = NEXTSTEP Then
					strStep = "SdDBProcess"
				Else 
					strStep = "Exit"
				End If
					
			Case "SdDBProcess"  
	   			nState = Install.SdDBProcess( IAParam )
				If nState = BACKSTEP Then
					strStep = "SdSetDBUser"
				ElseIf nState = NEXTSTEP Then
					strStep = "SdFinish"
				Else 
					strStep = "Exit"
				End If
	   		  
	   		Case "SdFinish"  
	   			Install.SdFinish(IAParam)
				strStep = "Exit"
				
	  		Case Else
	  		   	strStep = "Exit"
		End Select
	Loop
End Sub	