public override void Run()
{
m_oBuilder.Log("Running InnoSetup on " + ExpandMacros(m_sProject) + "...\r\n", true);
string sArguments = "\"" + ExpandMacros(m_sProject) + "\"";
Process processCompile = new Process();
processCompile.StartInfo.UseShellExecute = false;
processCompile.StartInfo.RedirectStandardOutput = true;
processCompile.StartInfo.CreateNoWindow = true;
processCompile.StartInfo.FileName = ExpandMacros(m_oBuilder.ParameterInnoSetupPath);
processCompile.StartInfo.Arguments = sArguments;
processCompile.Start();
// Capture the result
string output = processCompile.StandardOutput.ReadToEnd();
processCompile.WaitForExit();
m_oBuilder.Log(output + "\r\n", true);
if (output.IndexOf("0 succeeded") >= 0)
throw new Exception("Failed");
}