검색결과 리스트
외부 프로그램 실행에 해당되는 글 1건
- 2013.03.08 C# 외부 프로그램 실행
글
프로그램/C#
2013. 3. 8. 01:50
C# 외부 프로그램 실행
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 윈도우를 종료 System.Diagnostics.Process.Start( "cmd.exe" , "ShutDown.exe -s -f -t 00" ); 윈도우를 재부팅 System.Diagnostics.Process.Start( "cmd.exe" , "ShutDown.exe -r -f -t 00" ); 특정 폴더 열기 System.Diagnostics.Process.Start( "explorer.exe" , "C:\Temp" ); 특정 사이트 열기 도스명령어 실행 System.Diagnostics.Process.Start( "cmd.exe" , "/c dir" ); // cmd 옵션에 대해 더 알고싶으면.. c:>help cmd |
1 2 3 4 5 6 | Process myProcess = new Process(); string myDocumentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); myProcess.StartInfo.FileName = myDocumentsPath + "\MyFile.doc" ; myProcess.StartInfo.Verb = "Print" ; myProcess.StartInfo.CreateNoWindow = true ; myProcess.Start(); |
1 2 3 4 | ProcessStartInfo startInfo = new ProcessStartInfo( "IExplore.exe" ); startInfo.WindowStyle = ProcessWindowStyle.Minimized; startInfo.Arguments = "www.naver.com" ; Process.Start(startInfo); |
1 | Process.Start( "IExplore.exe" ); |
1 2 | Process.Start( "IExplore.exe" , "C:\myPath\myFile.htm" ); Process.Start( "IExplore.exe" , "C:\myPath\myFile.asp" ); |
'프로그램 > C#' 카테고리의 다른 글
C# 텍스트 배열에 나눠 넣기 (0) | 2013.03.08 |
---|---|
C# 끌어놓기 드래그 앤 드롭 (수정 필요) (0) | 2013.03.08 |
C# 폼 상속 (0) | 2013.03.08 |
C# 난수 생성 , rand Random (0) | 2013.03.08 |
C# 폼스타일 , FormBorderStyle (0) | 2013.03.08 |
RECENT COMMENT