C# 숨기기 방식으로 DOS 명령 실행

using System.Diagnostics;    //      

/// 
///       DOS  
/// 
/// DOS  
public static void runcmd(string command)
{
    Process process = new Process();
    try
    {
        process.StartInfo.FileName = "cmd.exe";
        process.StartInfo.Arguments = "/c" + command;
        process.StartInfo.UseShellExecute = false;
        process.StartInfo.RedirectStandardInput = true;
        process.StartInfo.RedirectStandardOutput = true;
        process.StartInfo.RedirectStandardError = true;
        process.StartInfo.CreateNoWindow = true;
        process.Start();
    }
    catch
    {
    }
}

좋은 웹페이지 즐겨찾기