/// <summary> /// Execute dotNetInstaller. /// </summary> /// <param name="dniPath"></param> /// <param name="dniArgs"></param> /// <param name="action"></param> /// <param name="logfile"></param> private void DniExec(string dniPath, string dniArgs, DniAction action, out string logfile) { logfile = string.Format("{0}{1}.log", _config.DestinationPath, action); _process = _vm.RunProgramInGuest( _config.DestinationPath, string.Format("/q /log /LogFile \"{0}\" {1}", logfile, dniArgs), 0); if (_config.ExitCodes.Count > 0) { _config.ExitCodes.Check(_process.ExitCode); } else if (_process.ExitCode != 0) { throw new Exception(string.Format("Execution failed, return code: {0}", _process.ExitCode)); } }
/// <summary> /// Execute dotNetInstaller. /// </summary> /// <param name="dniPath"></param> /// <param name="dniArgs"></param> /// <param name="action"></param> /// <param name="logfile"></param> private void DniExec(string dniPath, string dniArgs, DniAction action, out string logfile) { logfile = string.Format("{0}{1}.log", _config.DestinationPath, action); _process = _vm.RunProgramInGuest( _config.DestinationPath, string.Format("/q /log /LogFile \"{0}\" {1}", logfile, dniArgs), 0); if (_config.ExitCodes.Count > 0) { _config.ExitCodes.Check(_process.ExitCode); } else if (_process.ExitCode != 0) { throw new Exception(string.Format("Execution failed, return code: {0}", _process.ExitCode)); } }