private void execute(Process proc, string cmd, string arguments, Action<bool, string> onLineReceived)
{
Logger.Write("Executing {0} {1}", cmd, arguments);
if (onLineReceived != null)
proc.Query(cmd, arguments, false, Environment.CurrentDirectory, onLineReceived);
else
proc.Run(cmd, arguments, false, Environment.CurrentDirectory);
}