평가 및 의견을 보내려면 클릭하십시오.
MSDN
MSDN Library
.NET 개발
이전 버전
.NET Framework SDK 2.0
Class Library Reference
System.Diagnostics
ProcessStartInfo 클래스
ProcessStartInfo 속성
 UseShellExecute 속성

  저대역폭 보기 설정
이 페이지에서 다루는 특정 제품:.
Microsoft Visual Studio 2005/.NET Framework 2.0

다음 제품들은 다른 버전에서 다루어 집니다.
.NET Framework 클래스 라이브러리
ProcessStartInfo.UseShellExecute 속성

프로세스를 시작할 때 운영 체제 셸을 사용할 것인지 여부를 나타내는 값을 가져오거나 설정합니다.

네임스페이스: System.Diagnostics
어셈블리: System(system.dll)

Visual Basic(선언)
Public Property UseShellExecute As Boolean
Visual Basic(사용법)
Dim instance As ProcessStartInfo
Dim value As Boolean

value = instance.UseShellExecute

instance.UseShellExecute = value
C#
public bool UseShellExecute { get; set; }
C++
public:
property bool UseShellExecute {
    bool get ();
    void set (bool value);
}
J#
/** @property */
public boolean get_UseShellExecute ()

/** @property */
public void set_UseShellExecute (boolean value)
JScript
public function get UseShellExecute () : boolean

public function set UseShellExecute (value : boolean)

속성 값

프로세스를 시작할 때 셸을 사용하려면 true이고, 그렇지 않으면 프로세스가 실행 파일에서 직접 만들어집니다. 기본값은 true입니다.

이 속성을 false로 설정하면 입력, 출력 및 오류 스트림을 리디렉션할 수 있습니다.

Note참고

   UserName 속성이 Null 참조(Visual Basic의 경우 Nothing) 또는 빈 문자열이 아니면 UseShellExecutefalse여야 합니다. 그렇지 않으면 Process.Start(ProcessStartInfo) 메서드가 호출될 때 InvalidOperationException이 throw됩니다.

운영 체제 셸을 사용하여 프로세스를 시작하면 Process 구성 요소를 사용하여 문서(기본 열린 작업이 있는 실행 파일과 관련된 등록 파일 형식인)를 시작할 수 있으며 인쇄와 같은 파일 작업을 수행할 수 있습니다. UseShellExecutefalse이면 Process 구성 요소를 사용하여 실행 파일만 시작할 수 있습니다.

Note참고

ErrorDialog 속성을 true로 설정할 경우 UseShellExecute가 반드시 true여야 합니다.

WorkingDirectory 속성은 UseShellExecutefalse일 때보다 UseShellExecutetrue 일 때 다르게 동작합니다. UseShellExecutetrue이면 WorkingDirectory 속성은 실행 파일의 위치를 지정합니다. WorkingDirectory가 빈 문자열이면 현재 디렉터리는 해당 실행 파일을 포함하는 것으로 간주됩니다.

UseShellExecutefalse이면 WorkingDirectory 속성은 해당 실행 파일을 찾는 데 사용되지 않습니다. 대신 실행되는 프로세스에서 사용되며 새 프로세스의 컨텍스트 내에서만 의미를 갖습니다.

Visual Basic
compiler.StartInfo.FileName = "csc.exe"
compiler.StartInfo.Arguments = "/r:System.dll /out:sample.exe stdstr.cs"
compiler.StartInfo.UseShellExecute = False
compiler.StartInfo.RedirectStandardOutput = True
compiler.Start()

Console.WriteLine(compiler.StandardOutput.ReadToEnd())

compiler.WaitForExit()
C#
Process compiler = new Process();
compiler.StartInfo.FileName = "csc.exe";
compiler.StartInfo.Arguments = "/r:System.dll /out:sample.exe stdstr.cs";
compiler.StartInfo.UseShellExecute = false;
compiler.StartInfo.RedirectStandardOutput = true;
compiler.Start();    

Console.WriteLine(compiler.StandardOutput.ReadToEnd());

compiler.WaitForExit();
C++
Process^ compiler = gcnew Process;
compiler->StartInfo->FileName = "cl.exe";
compiler->StartInfo->Arguments = "/clr stdstr.cpp /link /out:sample.exe";
compiler->StartInfo->UseShellExecute = false;
compiler->StartInfo->RedirectStandardOutput = true;
compiler->Start();

Console::WriteLine( compiler->StandardOutput->ReadToEnd() );

compiler->WaitForExit();

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0에서 지원
커뮤니티 콘텐츠   커뮤니티 콘텐츠란?
새 콘텐츠 추가 RSS  주석
Processing
© 2009 Microsoft Corporation. All rights reserved. 사용약관  |  상표  |  개인정보보호
Page view tracker