win10 UWP 获取系统信息

最后更新于:2022-04-01 20:23:12

获取系统信息 ~~~ Windows.System.Profile.AnalyticsVersionInfo analyticsVersion = Windows.System.Profile.AnalyticsInfo.VersionInfo; reminder = analyticsVersion.DeviceFamily; ulong v = ulong.Parse(Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamilyVersion); ulong v1 = ( v & 0xFFFF000000000000L ) >> 48; ulong v2 = ( v & 0x0000FFFF00000000L ) >> 32; ulong v3 = ( v & 0x00000000FFFF0000L ) >> 16; ulong v4 = ( v & 0x000000000000FFFFL ); reminder = $"{v1}.{v2}.{v3}.{v4}"; Windows.ApplicationModel.Package package = Windows.ApplicationModel.Package.Current; reminder = package.Id.Architecture.ToString(); reminder = package.DisplayName; EasClientDeviceInformation eas = new EasClientDeviceInformation(); reminder= eas.SystemManufacturer; ~~~ reminder把字符串输出到textbox Windows.Desktop 10.0.10586.29 X86 参考:[https://www.suchan.cz/2015/08/uwp-quick-tip-getting-device-os-and-app-info/](https://www.suchan.cz/2015/08/uwp-quick-tip-getting-device-os-and-app-info/)
';