WMI를 사용하여 텍스트 크기를 조정하고 속성을 모니터링할 수 있습니까?

WMI를 사용하여 텍스트 크기를 조정하고 속성을 모니터링할 수 있습니까?

WMI를 사용하여 다음과 같은 항목을 감지할 수 있습니다.

  • 텍스트 크기 조정
  • 화면 해상도
  • 다중 모니터 구성/레이아웃

?

알겠습니다 Win32_DesktopMonitor만 이 정보는 전혀 제공되지 않는 것 같습니다.

답변1

텍스트 크기 조정:다음 두 사용자 레지스트리 값에 저장됩니다.

# AllUsers setting, which shows as (default)
(Get-ItemProperty "HKCU:\Control Panel\Desktop\WindowMetrics").AppliedDPI
# User's current scaling settings for each monitor
(Get-ItemProperty "HKCU:\Control Panel\Desktop\PerMonitorSettings\*").DpiValue

# AppliedDPI shows the "Default" scaling setting on a system level like:
96  : 100% 
120 : 125% 
144 : 150% 
192 : 200%  # (my default)
 
# DpiValue shows how many steps up or down *from Default* the current user's scaling setting is. 
# For example on my machine:
DpiValue : 2           # +2 = 250%
DpiValue : 0           # +0 = 200% (default)
DpiValue : 4294967294  # -1 = 150%
DpiValue : 4294967292  # -3 = 100%

모니터 레이아웃:

Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Screen]::AllScreens

화면 해상도:AllScreens위의 열거형 또는 다음 중 하나를 사용하세요 .

Get-CimInstance Win32_DesktopMonitor | select Name,Screen*
Get-CimInstance CIM_VideoController  | Select Name,Current*

관련 정보