다음을 통해 공유


SystemSetupInfo 클래스

정의

OOBE(Out-of-Box Experience)의 수명 주기에서 현재 단계를 설명하는 속성 및 이벤트를 제공합니다.

public ref class SystemSetupInfo abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 458752)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SystemSetupInfo final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 458752)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class SystemSetupInfo
Public Class SystemSetupInfo
상속
Object Platform::Object IInspectable SystemSetupInfo
특성

Windows 요구 사항

요구 사항 Description
디바이스 패밀리
Windows 10, version 1809 (10.0.17763.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v7.0에서 도입되었습니다.)

예제

UWP(유니버설 Windows 플랫폼) 앱은 OOBE 중에 특수한 동작(예: UI(사용자 인터페이스)에 설정된 범위가 지정된 기능 또는 OOBE가 완료된 후에만 시작되는 백그라운드 작업이 있으므로 OOBE가 완료되었는지 여부를 알아야 합니다. OEM으로 OOBE 중에 실행되는 앱일 수 있습니다.

private bool ShouldUseSimpleUserInterface()
{
    var oobeState = Windows.System.Profile.SystemSetupInfo.OutOfBoxExperienceState;

    // When this UWP is shown before OOBE is complete, use a simplified UI
    // with limited options, which matches the style of the rest of OOBE.
    return (oobeState != SystemOutOfBoxExperienceState.Completed);
}

OEM은 공장 현장 테스트 중에 디바이스가 OOBE로 성공적으로 부팅된다는 것을 알고 싶습니다. 모든 디바이스가 제조 프로세스의 최종 확인 단계로 이 테스트를 통과하기를 원하므로 자동화 중에 OOBE가 진행 중이고 준비가 되면 알림을 받습니다.

// Task that has its result set once OOBE is in progress.
private TaskCompletionSource<object> oobeInProgress;

// Called when OOBE state changes. Guaranteed to be called at least once, at
// the time of event registration.
private void OnOobeStateChanged(object sender, object e)
{
    var oobeState = Windows.System.Profile.SystemSetupInfo.OutOfBoxExperienceState;
    if (oobeState == SystemOutOfBoxExperienceState.InProgress)
    {
        oobeInProgress.TrySetResult(null);
    } 
}

private async void WaitForOobeStartedAsync()
{
    oobeInProgress = new TaskCompletionSource<object>();
    Windows.System.Profile.SystemSetupInfo.OutOfBoxExperienceStateChanged += OnOobeStateChanged;
    await oobeInProgress.Task; // NOTE: you could add a timeout here, and fail when hit.
    Windows.System.Profile.SystemSetupInfo.OutOfBoxExperienceStateChanged -= OnOobeStateChanged;
 }

설명

OOBE(Out-of-Box Experience)는 사용자가 Windows 10 디바이스를 처음 켭니다. OOBE는 EULA를 수락하고 시스템 기본 로캘을 설정하며 초기 사용자 계정을 설정하는 데 도움이 됩니다.

속성

Name Description
OutOfBoxExperienceState

OOBE(Out-of-Box Experience)의 수명 주기에서 현재 단계를 나타내는 값을 가져옵니다.

이벤트

Name Description
OutOfBoxExperienceStateChanged

OOBE(Out-of-Box Experience)의 수명 주기에서 현재 단계가 변경될 때 발생합니다.

적용 대상