Esempio n. 1
0
        public static string Shell(string path, string[] arguments)
        {
            SystemShell s = new SystemShell();

            s.Path = path;
            s.Arguments.AddRange(arguments);
            s.Run();
            return(s.Output);
        }
Esempio n. 2
0
        public static string ShellCmd(string command)         // TOCLEAN, Avoid when possible
        {
            if (command == "")
            {
                return("");
            }

            string path;

            string[] arguments;

            Platform.Instance.ShellCommandDirect(command, out path, out arguments);

            SystemShell s = new SystemShell();

            s.Path = path;
            s.Arguments.AddRange(arguments);
            s.WaitEnd         = true;
            s.ExceptionIfFail = false;
            s.Run();
            return(s.Output);
        }