Exemple #1
0
        public static RemoteExecutableResults Execute(string exePath, string workingDir, string arguments)
        {
            ExecutableFile wrapper = new ExecutableFile(exePath);

            wrapper.WorkingDirectory = workingDir;
            return(wrapper.Run(arguments));
        }
Exemple #2
0
        public RemoteExecutableResults ExecuteFile(string workingDirectory, string filePath, string arguments)
        {
            AuthenicateAssert();

            string expandedFilePath         = Environment.ExpandEnvironmentVariables(filePath);
            string expandedWorkingDirectory = Environment.ExpandEnvironmentVariables(workingDirectory);

            Console.WriteLine("Attempting to execute file:" + expandedFilePath + " " + arguments);
            RemoteExecutableResults results = new RemoteExecutableResults();

            try
            {
                results = ExecutableFile.Execute(filePath, expandedWorkingDirectory, arguments);
            }
            catch (Exception exc)
            {
                results.ExitCode = 1;
                results.Output   = exc.ToString();
            }
            return(results);
        }
Exemple #3
0
 public static RemoteExecutableResults Execute(string exePath, string workingDir, string arguments)
 {
     ExecutableFile wrapper = new ExecutableFile(exePath);
     wrapper.WorkingDirectory = workingDir;
     return wrapper.Run(arguments);
 }