function ExecAsync (strCommand) {
	var wsh;

	// Get WSH Object
	wsh = WScript.CreateObject("WScript.Shell");

	return (wsh.Exec (strCommand));
}

function ExecSync (strCommand) {
	var wsh;
	var oExec;

	// Get WSH Object
	wsh = WScript.CreateObject("WScript.Shell");

	oExec = wsh.Exec (strCommand);

	while (oExec.Status == 0) {
		WScript.sleep(100);
	}

	return (oExec);
}

function ExecAndLog (strCommand) {
	var wsh;
	var oExec;

	// Get WSH Object
	wsh = WScript.CreateObject("WScript.Shell");

	oExec = wsh.Exec (strCommand);


	while (oExec.Status == 0) {
		WScript.sleep(100);
	}

	if (oExec.ExitCode == 0) {
		LogEvent (0,"Execution of " + strCommand + " completed successfully");
	} else {
		LogEvent (1,"Execution of " + strCommand + " failed with ExitCode = " +oExec.ExitCode);
	}
}