티스토리 뷰
using System.Diagnostics;
Process ps = new Process(); //프로세스 생성
ps.StartInfo.FileName = "cmd.exe"; //정보저장
ps.StartInfo.UseShellExecute = false; //쉘창 닫기
ps.StartInfo.RedirectStandardInput = true; //입력가능
ps.StartInfo.RedirectStandardOutput = true; //출력가능
//ps.StartInfo.RedirectStandardError = true; //에러값
//ps.StartInfo.CreateNoWindow = true;//윈도우창 만들기
//명령 실행
ps.Start();//프로세스시작
ps.StandardInput.WriteLine("ipconfig");//명령어 실행
ps.StandardInput.Close();//명령닫기
MessageBox.Show(ps.StandardOutput.ReadToEnd());//출력값 받아오기
ps.WaitForExit();//프로세스 끝날때까지 기다림
ps.Close();//프로세스 닫기
Process ps = new Process(); //프로세스 생성
ps.StartInfo.FileName = "cmd.exe"; //정보저장
ps.StartInfo.UseShellExecute = false; //쉘창 닫기
ps.StartInfo.RedirectStandardInput = true; //입력가능
ps.StartInfo.RedirectStandardOutput = true; //출력가능
//ps.StartInfo.RedirectStandardError = true; //에러값
//ps.StartInfo.CreateNoWindow = true;//윈도우창 만들기
//명령 실행
ps.Start();//프로세스시작
ps.StandardInput.WriteLine("ipconfig");//명령어 실행
ps.StandardInput.Close();//명령닫기
MessageBox.Show(ps.StandardOutput.ReadToEnd());//출력값 받아오기
ps.WaitForExit();//프로세스 끝날때까지 기다림
ps.Close();//프로세스 닫기
'Coding > C#/Win7Phone' 카테고리의 다른 글
윈도우7 모바일 개발환경구축 (0) | 2010.10.15 |
---|---|
UrlEncode와 UrlDecode 뻘짓 (0) | 2010.10.12 |
웹페이지 로그인 (1) | 2010.10.05 |
이벤트 등록문제 (0) | 2010.07.11 |
실행중인 프로세스 이름 및 경로 받아 오기 (0) | 2010.07.01 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- ZXing
- naverddos
- 네이버디도스
- 쿠키 해킹 수정
- Android
- 달
- 윈도우7
- URLDecode
- url 변환
- template
- 웹페이지 로그인
- 바코드
- LNK2019
- ddos
- urlencode
- 첫만남
- 안드로이드
- 윈폰7
- 개발환경구축
- 윈도우폰7
- MOON
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함