Call Install()
If ExitCode <> 0 Then
ExitCode = 1
End If
WScript.quit(ExitCode) 'Main process
Sub Install()
ShowTitle 'Show Server information
ResetOpenFile_SecurityWarning
BackupReg() 'Backup requirement registry keys
g_bWarning = False
g_OldInstances = GetInstalledInstances() 'Get already installed instances name from registry
If not InitEnv() Then 'Initialize environment parameters
ExitCode = 1
ShowSummary
Exit Sub
End If
If not GetInstances() Then 'Get instance name from all of the configuration files
ExitCode = 2
ShowSummary
Exit Sub
End If
If not CheckInstances() Then 'Remove installed instances from g_Instances table, and keep no installed or need upgrade instances
ExitCode = 3
ShowSummary
Exit Sub
End If
If not InstallInstances() Then 'Install(or upgrade) instances
ExitCode = 4
ShowSummary
Exit Sub
End If
If not ApplyHotFix() Then 'Apply Hotfix, if have
ExitCode = 5
ShowSummary
Exit Sub
End If
ShowSummary
ResumeOpenFile_SecurityWarning