ProcessStartInfo.Environment 속성

정의

이 프로세스와 자식 프로세스에 적용되는 환경 변수를 가져옵니다.

public:
 property System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ Environment { System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ get(); };
public System.Collections.Generic.IDictionary<string,string?> Environment { get; }
public System.Collections.Generic.IDictionary<string,string> Environment { get; }
member this.Environment : System.Collections.Generic.IDictionary<string, string>
Public ReadOnly Property Environment As IDictionary(Of String, String)

속성 값

이 프로세스 및 해당 자식 프로세스에 적용되는 환경 변수를 포함하는 제네릭 사전입니다. 기본값은 null입니다.

설명

환경 변수 파일에 대 한 검색 경로, 임시 파일, 애플리케이션별 옵션 및 기타 유사한 정보에 대 한 디렉터리를 포함 합니다. 속성을 직접 설정할 수는 없지만 속성에서 Environment 반환된 제네릭 사전을 수정할 수 있습니다. 예를 들어 다음 코드는 TempPath 환경 변수 myProcess.StartInfo.Environment.Add("TempPath", "C:\\Temp")를 추가합니다. 속성을 변경 EnvironmentUseShellExecute 후 프로세스를 시작하려면 속성을 로 false 설정해야 합니다. 가 이trueUseShellExecute 메서드가 InvalidOperationException 호출되면 이 Start throw됩니다.

.NET Framework 애플리케이션을 사용 하는 Environment 속성은 사용 하 여 동일한는 EnvironmentVariables 속성.

적용 대상

추가 정보