<job id="Upgrade">

   <script language="JScript" src="QJScriptLib/log.js"/>
   <script language="JScript" src="QJScriptLib/execute.js"/>
   <script language="JScript" src="QJScriptLib/reboot.js"/>
   <script language="JScript" src="QJScriptLib/registry.js"/>
   <script language="JScript" src="QJScriptLib/OS.js"/>
   <script language="JScript" src="Upgrade/Consts.js"/>
   <script language="JScript" src="Upgrade/version.js"/>

   <script language="JScript">
	var strRebootMode;
	var strCheckMode;
	var nRC;

	strRebootMode = GetRebootMode();

	if (strRebootMode == "") {
	        strCheckMode = CheckNeedUpgrade();
WScript.Echo ("!strCheckMode = " + strCheckMode + "!");
			eval ("nRC = " + strCheckMode + "();");
		strRebootMode = "Phase1";
	} else {
WScript.Echo ("!strRebootMode = " + strRebootMode + "!");
		eval ("nRC = " + strRebootMode + "();");
	}

	if (nRC == 0) {
		LogEvent (0,"Upgrade " + strRebootMode + " Compleated successfully");
	} else {
		LogEvent (1,"Upgrade " + strRebootMode + " Compleate with error. code = " + nRC);
	}
   </script>

</job>