问题
I am developing an application for Windows 8 and I am testing it on Microsoft's Surface. Does any one know how I can retrieve the unique device ID of Surface?
Just like we do for Windows Phone by retrieving its unique device id using Microsoft.Phone.Info
namespace.
回答1:
I use Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken(null).Id
converted to string, details at http://coding.kulman.sk/how-to-uniquely-identify-a-windows-8-device/
回答2:
AFAIK, the closest thing you'll find (for Windows Store apps) is the ASHWID, which isn't device specific but rather app+device specific. There are a number of options you can provide in terms of weighting the different factors that comprise the ASHWID.
回答3:
EasClientDeviceInformation esClientDeviceInformation=new EasClientDeviceInformation(); var localDeviceID= esClientDeviceInformation.Id;
Happy Coding:)
来源:https://stackoverflow.com/questions/13913579/retrieving-the-unique-device-id-of-microsoft-surface