블로그 이미지
프로그램을 가장 훌륭하게 작성하는 방법은 상태가 변경되는 오브젝트들과 수학적인 값을 나타내는 오브젝트들의 조합으로 표현하는 것이다. -Kent Beck 초초초보

카테고리

Programming (184)
ASP.NET (9)
Silverlight (2)
Javascript (20)
C# (8)
java (25)
SQL (14)
Oracle (3)
MyBatis (3)
기타 (52)
개발방법론 (1)
trouble shooting (2)
Linux (5)
스칼라 (5)
html (2)
grails & gradle (3)
Spring (2)
rabbitmq (1)
(3)
spark (0)
docker (3)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글


참조 : http://sandeep-aparajit.blogspot.com/2008/04/how-to-execute-command-in-c.html
         http://msdn.microsoft.com/ko-kr/library/e78byta0(VS.80).aspx
         http://www.uvm.edu/~jgm/wordpress/?p=121


System.Diagnostics.ProcessStartInfo  를 이용하여 실행

인증서 등록하기 예제
인증서등록 도구인  certmgr.exe 와 인증서 hanjin.cer 필요 함.   

class Program

    {

        static void Main(string[] args)

        {

            System.Diagnostics.ProcessStartInfo ps =

                new System.Diagnostics.ProcessStartInfo("cmd",

                "/c certmgr.exe -add hanjin.cer -c -s -r localMachine Root");

            ps.RedirectStandardOutput = true;

            ps.UseShellExecute = false;

            ps.CreateNoWindow = true;

            System.Diagnostics.Process p =

                new System.Diagnostics.Process();

            p.StartInfo = ps;

            p.Start();

 

            string result = p.StandardOutput.ReadToEnd();

            Console.WriteLine(result);

        }


인증서는 보안상. 업로드 불가.



끝.
Posted by 초초초보
, |