WindowsIntegrityPolicy 클래스

정의

현재 Windows 10 보안 모드(10 S 모드)와 모드가 변경될 때 발생하는 이벤트에 대한 정보를 제공합니다.

public ref class WindowsIntegrityPolicy 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 WindowsIntegrityPolicy 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 WindowsIntegrityPolicy
Public Class WindowsIntegrityPolicy
상속
Object Platform::Object IInspectable WindowsIntegrityPolicy
특성

Windows 요구 사항

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

예제

public class WindowsLockdownExample
{
    public WindowsLockdownExample()
    {
        Windows.System.Profile.WindowsIntegrityPolicy.PolicyChanged += this.WindowsIntegrityPolicy_PolicyChanged;
    }

    ~WindowsLockdownExample()
    {
        Windows.System.Profile.WindowsIntegrityPolicy.PolicyChanged -= this.WindowsIntegrityPolicy_PolicyChanged;
    }

    private void WindowsIntegrityPolicy_PolicyChanged(object sender, object e)
    {
        // Windows secure mode (10 S mode) has changed.

        this.ProcessWindowsIntegrityPolicy();

        if (!Windows.System.Profile.WindowsIntegrityPolicy.IsEnabled)
        {
            // There are certain things that you may want to do when Windows secure mode
            // (10 S mode) has changed from the enabled to the disabled state. For example,
            // a security application might want to offer anti-virus software on this 
            // device.
        }
    }

    public void ProcessWindowsIntegrityPolicy()
    {
        // Check Windows secure mode (10 S mode) status.

        if (Windows.System.Profile.WindowsIntegrityPolicy.IsEnabled)
        {
            // Windows secure mode (10 S mode) is enabled.

            if (Windows.System.Profile.WindowsIntegrityPolicy.IsEnabledForTrial)
            {
                // Furthermore, it has been enabled for trial purposes. Respond accordingly.
                // For example, logging/tagging this device for the organization to 
                // monitor devices that are under trial mode.
            }
            else
            {
                // It has been enabled for normal scenarios. Respond accordingly.
                // For example, don’t try to invoke any process that will be blocked
                // by the policy, or change your UI or error message. For example, 
                // security software could show a different error message about the process
                // being blocked when Windows secure mode (10 S mode) is enabled.
            }
        }

        // Check whether Windows secure mode (10 S mode) can be disabled, and whether disabling is supported.

        if (Windows.System.Profile.WindowsIntegrityPolicy.CanDisable)
        {
            if (Windows.System.Profile.WindowsIntegrityPolicy.IsDisableSupported)
            {
                // Windows secure mode (10 S mode) can be disabled, and disabling is supported.
                // Respond accordingly. For example, report this information back to any cloud-based
                // solution, in case it need to push any policy disabling package to the right devices.
            }
            else
            {
                // Windows secure mode (10 S mode) can be disabled, but disabling is not supported.
                // So, Windows secure mode (10 S mode) can never be changed. Work around this situation.
                // For example, show the appropriate error message when you fail to disable Windows
                // secure mode (10 S mode).
            }
        }
    }
}

설명

Windows는 10 S(Windows 잠금이라고도 함)를 모드로 제공합니다. Windows가 10 S 모드인 경우 Microsoft 구성 요소 및 UWP(유니버설 Windows 플랫폼) 앱만 실행할 수 있습니다. 및 와 cmd.exe같은 regedit.exe 특정 특정 구성 요소도 허용되지 않습니다. UWP 앱, 특히 보안 및 방화벽 앱은 제대로 작동하려면 현재 10 S 모드를 알고 있어야 합니다. 이러한 앱은 10 S 모드가 사용에서 사용 안 함으로 전환될 때도 알림을 받아야 합니다.

속성

CanDisable

런타임 및/또는 오프라인, OEM(원래 장비 제조업체) 또는 타사에서 보안 모드(10S 모드)를 사용하지 않도록 설정할 수 있는지 Windows 10 여부를 나타내는 값을 가져옵니다.

IsDisableSupported

타사 공급업체가 런타임에 Windows 10 보안 모드(10S 모드)를 사용하지 않도록 설정하기 위해 게시된 방법이 있는지 여부(기타 필요한 조건에 대한 설명 참조)를 나타내는 값을 가져옵니다.

IsEnabled

Windows 10 보안 모드(10 S 모드)를 사용할 수 있는지 여부를 나타내는 값을 가져옵니다(Windows 잠금 모드).

IsEnabledForTrial

Windows 10 보안 모드(10 S 모드)가 사용되도록 설정되었는지 여부를 나타내는 값을 가져옵니다(Windows 잠금 모드).

이벤트

PolicyChanged

현재 Windows 10 보안 모드(10S 모드)가 변경될 때 발생합니다.

적용 대상