프로그래밍/C#
c# 외부 응용 프로그램 호출 Process.start
젤리씨
2013. 4. 20. 12:48
728x90
C# 에서 외부 응용 프로그램을 호출하는 방법입니다.
맨먼저 using System.Diagnostics; 를 사용하면
System.Diagnostics.Process.Start() 대신 Process.Start() 로 글을 줄일 수 있습니다
특정 폴더 열기
System.Diagnostics.Process.Start("explorer.exe", "C:\temp");
특정 사이트 열기
System.Diagnostics.Process.Start("explorer.exe", http://www.naver.com);
윈도우를 종료
System.Diagnostics.Process.Start("cmd.exe","shutdown.exe -s -f -t 01");
윈도우를 재부팅
System.Diagnostics.Process.Start("cmd.exe","shutdown.exe -r -f -t 01");
html 이나 asp 파일을 열기
Process.Start("IExplore.exe", "C:\temp\default.html");
Process.Start("IExplore.exe", "C:\temp\default.asp");
728x90