Exemplo n.º 1
0
        public static void start(string cmdText)
        {
            //Network 변수
            StreamWriter DosWriter;
            StreamReader DosRedaer;
            StreamReader ErrorReader;

            //프로세스 생성및 초기화
            Process          DosPr = new Process();
            ProcessStartInfo psI   = new ProcessStartInfo("cmd");

            psI.UseShellExecute        = false;
            psI.RedirectStandardInput  = true;
            psI.RedirectStandardOutput = true;
            psI.RedirectStandardError  = true;
            psI.CreateNoWindow         = true;


            //명령 실행
            DosPr.StartInfo = psI;
            DosPr.Start();
            DosWriter           = DosPr.StandardInput;
            DosRedaer           = DosPr.StandardOutput;
            ErrorReader         = DosPr.StandardError;
            DosWriter.AutoFlush = true;

            DosWriter.WriteLine(cmdText);
            DosWriter.Close();
        }
Exemplo n.º 2
0
        //GPS 실행
        private void Dos_cmd()
        {
            //Network 변수
            StreamWriter DosWriter;
            StreamReader DosRedaer;
            StreamReader ErrorReader;

            //프로세스 생성및 초기화
            Process          DosPr = new Process();
            ProcessStartInfo psI   = new ProcessStartInfo("cmd", "/c revData.exe");

            psI.UseShellExecute        = false;
            psI.RedirectStandardInput  = true;
            psI.RedirectStandardOutput = true;
            psI.RedirectStandardError  = true;
            psI.CreateNoWindow         = false;

            //명령 실행
            DosPr.StartInfo = psI;
            DosPr.Start();
            DosWriter   = DosPr.StandardInput;
            DosRedaer   = DosPr.StandardOutput;
            ErrorReader = DosPr.StandardError;

            DosWriter.AutoFlush = true;
            DosWriter.Close();
        }