如何在 UWP 应用程序中获取 Windows 10 设备 ID? [英] How to get Windows 10 Device ID in UWP application?

查看:36
本文介绍了如何在 UWP 应用程序中获取 Windows 10 设备 ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个在公司本地网络中运行的 Windows 10 UWP 客户端应用程序.该应用程序需要知道 Windows 10 设备 ID 才能识别安装它的每台 PC.您可以在设置"-关于"页面中查看 Windows 10 设备 ID 的值:

我尝试使用 EasClientDeviceInformation.Id 但其值不同.

如何获取 Windows 10 设备 ID?

解决方案

我认为 SystemIdentification 类正是您要找的.它在设置页面中不提供设备 ID.但它用于唯一标识设备,如 Microsoft Docs 中建议的那样.

var systemId = Windows.System.Profile.SystemIdentification.GetSystemIdForPublisher();

<块引用>

提供信息以唯一标识应用程序所在的系统正在运行.

https://docs.microsoft.com/en-us/uwp/api/windows.system.profile.systemidentification

I am developing a Windows 10 UWP client application which run in company's local network. The application needs to know Windows 10 Device ID to identify each PC that it's installed on. You can see value of Windows 10 Device ID in Settings-About page:

I tried to use EasClientDeviceInformation.Id but its value is different.

How do I do to get Windows 10 Device ID?

解决方案

I think SystemIdentification class is what you are looking for. It doesnot provide device id in settings page. But it is used to uniquely identify the device as suggested in Microsoft Docs.

var systemId = Windows.System.Profile.SystemIdentification.GetSystemIdForPublisher();

Provides information to uniquely identify the system on which the app is running.

https://docs.microsoft.com/en-us/uwp/api/windows.system.profile.systemidentification

这篇关于如何在 UWP 应用程序中获取 Windows 10 设备 ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆