public bool ShellRun(string cmd, bool runAsAdministrator = false) { try { if (string.IsNullOrEmpty(cmd)) { throw new ArgumentNullException(); } WindowsShellRun.Start(cmd, runAsAdministrator); return(true); } catch (Exception ex) { ShowMsg("Could not start " + cmd, ex.Message, null); } return(false); }
public bool ShellRun(string cmd, bool runAsAdministrator = false) { try { if (string.IsNullOrEmpty(cmd)) { throw new ArgumentNullException(); } WindowsShellRun.Start(cmd, runAsAdministrator); return(true); } catch (Exception ex) { string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("couldnotStartCmd"), cmd); ShowMsg(errorMsg, ex.Message, null); } return(false); }