private Start ( string fileName, string arguments, string userName, System password, string domain ) : System.Diagnostics.Process | ||
fileName | string | |
arguments | string | |
userName | string | |
password | System | |
domain | string | |
return | System.Diagnostics.Process |
public static System.Diagnostics.Process Start(string fileName, string arguments, string userName, System.Security.SecureString password, string domain) { throw null; }
public void WaitForExit() { }
Process::Start ( string fileName, string userName, |
|
Process::Start ( string fileName, string arguments, string userName, |
|
Process::Start ( System startInfo ) : System.Diagnostics.Process | |
Process::Start ( string fileName ) : System.Diagnostics.Process | |
Process::Start ( string fileName, string arguments ) : System.Diagnostics.Process | |
Process::Start ( string fileName, string userName, System password, string domain ) : System.Diagnostics.Process | |
Process::Start ( ) : bool |
public String cmd(String cnd) { cnd = cnd.Trim(); String output = " "; Console.WriteLine(cnd); if ((cnd.Substring(0, 3).ToLower() == "cd_") && (cnd.Length > 2)) { if (System.IO.Directory.Exists(cnd.Substring(2).Trim())) cpath = cnd.Substring(2).Trim(); } else { cnd = cnd.Insert(0, "/B /c "); Process p = new Process(); p.StartInfo.WorkingDirectory = cpath; p.StartInfo.CreateNoWindow = true; p.StartInfo.FileName = "cmd.exe"; p.StartInfo.Arguments = cnd; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.Start(); output = p.StandardOutput.ReadToEnd(); // output of cmd output = (output.Length == 0) ? " " : output; p.WaitForExit(); } return output; } // end cmd